Skip to content

Commit

Permalink
Merge branch '4.x' into feature/country-field-disabling-when-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrizmaselli authored Jul 8, 2024
2 parents f16b5ac + f37e5c8 commit a064696
Show file tree
Hide file tree
Showing 30 changed files with 212 additions and 6 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Disable editing country for existing address to be compliant with Profile V2 structure.

- Fix the validations rules for Saudi Arabia.

- Enable autocomplete postal code from reference field for ARE [[KI#312132](https://vtexhelp.zendesk.com/agent/tickets/312132)].

## [4.24.4] - 2024-07-05


## [4.24.3] - 2024-06-06

### Fixed
Expand Down Expand Up @@ -954,4 +961,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
[Unreleased]: https://github.com/vtex/address-form/compare/v4.23.2...HEAD
[4.23.2]: https://github.com/vtex/address-form/compare/v4.23.1...v4.23.2
[4.23.1]: https://github.com/vtex/address-form/compare/v4.23.0...v4.23.1
[4.23.0]: https://github.com/vtex/address-form/compare/v4.22.8...v4.23.0
[4.23.0]: https://github.com/vtex/address-form/compare/v4.22.8...v4.23.0
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "address-form",
"vendor": "vtex",
"version": "4.24.3",
"version": "4.24.4",
"title": "address-form React component",
"description": "address-form React component",
"defaultLocale": "en",
Expand Down
1 change: 1 addition & 0 deletions messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "عنوان غير صالح.",
"address-form.error.generic": "حقل غير صالح.",
"address-form.field.addressQuery": "العنوان",
"address-form.field.emirates": "إمارات",
"address-form.field.notApplicable": "غير متاح",
"address-form.field.noNumber": "بدون أرقام",
"address-form.field.country": "البلد",
Expand Down
1 change: 1 addition & 0 deletions messages/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Невалиден адрес.",
"address-form.error.generic": "Невалидно поле.",
"address-form.field.addressQuery": "Адрес",
"address-form.field.emirates": "إمارات",
"address-form.field.notApplicable": "Няма",
"address-form.field.noNumber": "Няма номер",
"address-form.field.country": "Държава",
Expand Down
1 change: 1 addition & 0 deletions messages/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Adreça no vàlida.",
"address-form.error.generic": "Camp no vàlid.",
"address-form.field.addressQuery": "Adreça",
"address-form.field.emirates": "Emirats",
"address-form.field.notApplicable": "No escau",
"address-form.field.noNumber": "Sense número",
"address-form.field.country": "País",
Expand Down
1 change: 1 addition & 0 deletions messages/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Invalid address.",
"address-form.error.generic": "Invalid field.",
"address-form.field.addressQuery": "Address",
"address-form.field.emirates": "Emirates",
"address-form.field.notApplicable": "N/A",
"address-form.field.noNumber": "No number",
"address-form.field.country": "Country",
Expand Down
1 change: 1 addition & 0 deletions messages/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Neplatná adresa.",
"address-form.error.generic": "Neplatné pole.",
"address-form.field.addressQuery": "Adresa",
"address-form.field.emirates": "Emiráty",
"address-form.field.notApplicable": "N/A",
"address-form.field.noNumber": "Žádné číslo",
"address-form.field.country": "Země",
Expand Down
1 change: 1 addition & 0 deletions messages/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Ugyldig adresse.",
"address-form.error.generic": "Ugyldigt felt.",
"address-form.field.addressQuery": "Adresse",
"address-form.field.emirates": "Emiraterne",
"address-form.field.notApplicable": "Ikke tilgængelig",
"address-form.field.noNumber": "Intet nummer",
"address-form.field.country": "Land",
Expand Down
1 change: 1 addition & 0 deletions messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Ungültige Adresse.",
"address-form.error.generic": "Ungültiges Feld.",
"address-form.field.addressQuery": "Adresse",
"address-form.field.emirates": "Emirate",
"address-form.field.notApplicable": "N/A",
"address-form.field.noNumber": "Keine Nummer",
"address-form.field.country": "Land",
Expand Down
1 change: 1 addition & 0 deletions messages/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Άκυρη διεύθυνση.",
"address-form.error.generic": "Άκυρο πεδίο.",
"address-form.field.addressQuery": "Διεύθυνση",
"address-form.field.emirates": "Ηνωμένα Αραβικά Εμιράτα",
"address-form.field.notApplicable": "Κ/Α",
"address-form.field.noNumber": "Δεν υπάρχει αριθμός",
"address-form.field.country": "Χώρα",
Expand Down
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Invalid address.",
"address-form.error.generic": "Invalid field.",
"address-form.field.addressQuery": "Address",
"address-form.field.emirates": "Emirates",
"address-form.field.notApplicable": "N/A",
"address-form.field.noNumber": "No number",
"address-form.field.country": "Country",
Expand Down
1 change: 1 addition & 0 deletions messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Dirección inválida.",
"address-form.error.generic": "Campo inválido.",
"address-form.field.addressQuery": "Dirección",
"address-form.field.emirates": "Emiratos",
"address-form.field.notApplicable": "S/N",
"address-form.field.noNumber": "Sin número",
"address-form.field.country": "País",
Expand Down
1 change: 1 addition & 0 deletions messages/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Virheellinen osoite.",
"address-form.error.generic": "Virheellinen kenttä.",
"address-form.field.addressQuery": "Osoite",
"address-form.field.emirates": "Emiraatit",
"address-form.field.notApplicable": "",
"address-form.field.noNumber": "Ei numeroa",
"address-form.field.country": "Maa",
Expand Down
1 change: 1 addition & 0 deletions messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Adresse non valable.",
"address-form.error.generic": "Champ non valable.",
"address-form.field.addressQuery": "Adresse",
"address-form.field.emirates": "Émirats",
"address-form.field.notApplicable": "N/A",
"address-form.field.noNumber": "Pas de numéro",
"address-form.field.country": "Pays",
Expand Down
1 change: 1 addition & 0 deletions messages/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Érvénytelen cím.",
"address-form.error.generic": "Érvénytelen mező.",
"address-form.field.addressQuery": "Cím",
"address-form.field.emirates": "Emirátusok",
"address-form.field.notApplicable": "Nem elérhető",
"address-form.field.noNumber": "Nincs szám",
"address-form.field.country": "Ország",
Expand Down
1 change: 1 addition & 0 deletions messages/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Alamat tidak valid.",
"address-form.error.generic": "Bidang tidak valid.",
"address-form.field.addressQuery": "Alamat",
"address-form.field.emirates": "Emirat",
"address-form.field.notApplicable": "Tidak Ada",
"address-form.field.noNumber": "Tidak ada angka",
"address-form.field.country": "Negara",
Expand Down
1 change: 1 addition & 0 deletions messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Indirizzo non valido.",
"address-form.error.generic": "Campo non valido.",
"address-form.field.addressQuery": "Indirizzo",
"address-form.field.emirates": "Emirati",
"address-form.field.notApplicable": "N/D",
"address-form.field.noNumber": "Nessun numero",
"address-form.field.country": "Nazione",
Expand Down
1 change: 1 addition & 0 deletions messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "잘못된 주소입니다.",
"address-form.error.generic": "잘못된 필드입니다.",
"address-form.field.addressQuery": "주소",
"address-form.field.emirates": "아랍에미리트",
"address-form.field.notApplicable": "해당 없음",
"address-form.field.noNumber": "번호 없음",
"address-form.field.country": "국가",
Expand Down
1 change: 1 addition & 0 deletions messages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Ongeldig adres.",
"address-form.error.generic": "Ongeldig veld.",
"address-form.field.addressQuery": "Adres",
"address-form.field.emirates": "Emiraten",
"address-form.field.notApplicable": "NVT",
"address-form.field.noNumber": "Geen nummer",
"address-form.field.country": "Land",
Expand Down
1 change: 1 addition & 0 deletions messages/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Nieprawidłowy adres.",
"address-form.error.generic": "Nieprawidłowe pole.",
"address-form.field.addressQuery": "Adres",
"address-form.field.emirates": "Emiraty",
"address-form.field.notApplicable": "B/D",
"address-form.field.noNumber": "Brak numeru",
"address-form.field.country": "Kraj",
Expand Down
1 change: 1 addition & 0 deletions messages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Endereço inválido.",
"address-form.error.generic": "Campo inválido.",
"address-form.field.addressQuery": "Endereço",
"address-form.field.emirates": "Emirados",
"address-form.field.notApplicable": "S/N",
"address-form.field.noNumber": "Sem número",
"address-form.field.country": "País",
Expand Down
1 change: 1 addition & 0 deletions messages/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Adresă invalidă.",
"address-form.error.generic": "Câmp invalid.",
"address-form.field.addressQuery": "Adresă",
"address-form.field.emirates": "Emiratele Arabe Unite",
"address-form.field.notApplicable": "Nu se aplică",
"address-form.field.noNumber": "Fără număr",
"address-form.field.country": "Țara",
Expand Down
1 change: 1 addition & 0 deletions messages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Недействительный адрес.",
"address-form.error.generic": "Недействительное поле.",
"address-form.field.addressQuery": "Название улицы",
"address-form.field.emirates": "Эмираты",
"address-form.field.notApplicable": "Нет",
"address-form.field.noNumber": "Без номера",
"address-form.field.country": "Страна",
Expand Down
1 change: 1 addition & 0 deletions messages/sk.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Neplatná adresa.",
"address-form.error.generic": "Neplatné pole.",
"address-form.field.addressQuery": "Adresa",
"address-form.field.emirates": "Emiráty",
"address-form.field.notApplicable": "Nevzťahuje sa",
"address-form.field.noNumber": "Žiadne číslo",
"address-form.field.country": "Krajina",
Expand Down
1 change: 1 addition & 0 deletions messages/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Neveljaven naslov.",
"address-form.error.generic": "Neveljavno polje.",
"address-form.field.addressQuery": "Naslov",
"address-form.field.emirates": "Emirati",
"address-form.field.notApplicable": "Ni na voljo",
"address-form.field.noNumber": "Ni števila",
"address-form.field.country": "Država",
Expand Down
1 change: 1 addition & 0 deletions messages/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Ogiltig adress.",
"address-form.error.generic": "Ogiltigt fält.",
"address-form.field.addressQuery": "Adress",
"address-form.field.emirates": "Förenade Arabemiraten",
"address-form.field.notApplicable": "Ej tillgängligt",
"address-form.field.noNumber": "Inga nummer",
"address-form.field.country": "Land",
Expand Down
1 change: 1 addition & 0 deletions messages/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "ที่อยู่ไม่ถูกต้อง",
"address-form.error.generic": "ฟิลด์ข้อมูลไม่ถูกต้อง",
"address-form.field.addressQuery": "ที่อยู่",
"address-form.field.emirates": "อาหรับเอมิเรตส์",
"address-form.field.notApplicable": "N/A",
"address-form.field.noNumber": "ไม่มีเลขที่",
"address-form.field.country": "ประเทศ",
Expand Down
1 change: 1 addition & 0 deletions messages/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"address-form.error.ERROR_GOOGLE_ADDRESS": "Недійсна адреса.",
"address-form.error.generic": "Недійсне значення поля.",
"address-form.field.addressQuery": "Адреса",
"address-form.field.emirates": "Емірати",
"address-form.field.notApplicable": "Не доступно",
"address-form.field.noNumber": "Номер відсутній",
"address-form.field.country": "Країна",
Expand Down
23 changes: 19 additions & 4 deletions react/country/ARE.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import { POSTAL_CODE } from '../constants'
import { firstLevelPostalCodes } from '../transforms/postalCodes'
import { getOneLevel } from '../transforms/addressFieldsOptions'
import { POSTAL_CODE , ONE_LEVEL} from '../constants'

const emiratesPostalCodeData = {
'Abu Dhabi': '00000',
Dubai: '00000',
Sharjah: '00000',
Ajman: '00000',
'Umm Al Quwain': '00000',
'Ras Al Khaimah': '00000',
Fujairah: '00000',
}

export default {
country: 'ARE',
abbr: 'AE',
postalCodeFrom: POSTAL_CODE,
postalCodeFrom: ONE_LEVEL,
postalCodeLevels: ['reference'],
firstLevelPostalCodes: firstLevelPostalCodes(emiratesPostalCodeData),
fields: [
{
hidden: true,
Expand Down Expand Up @@ -42,11 +56,12 @@ export default {
size: 'xlarge',
},
{
hidden: true,
name: 'reference',
maxLength: 750,
label: 'reference',
label: 'emirates',
size: 'xlarge',
level: 1,
options: getOneLevel(emiratesPostalCodeData),
},
{
hidden: true,
Expand Down
Loading

0 comments on commit a064696

Please sign in to comment.