-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #552 from vtex/add/hungary-4.x
Add Hungary country rules and placeholder
- Loading branch information
Showing
27 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
import { POSTAL_CODE } from '../constants' | ||
|
||
export default { | ||
country: 'HUN', | ||
abbr: 'HU', | ||
postalCodeFrom: POSTAL_CODE, | ||
fields: [ | ||
{ | ||
hidden: true, | ||
name: 'country', | ||
maxLength: 100, | ||
label: 'country', | ||
size: 'medium', | ||
}, | ||
{ | ||
name: 'postalCode', | ||
label: 'postalCode', | ||
maxLength: 4, | ||
required: true, | ||
mask: '9999', | ||
regex: /^[1-9]\d{3}$/, | ||
size: 'small', | ||
autoComplete: 'nope', | ||
postalCodeAPI: false, | ||
}, | ||
{ | ||
name: 'street', | ||
label: 'street', | ||
required: true, | ||
size: 'xlarge', | ||
}, | ||
{ | ||
name: 'number', | ||
maxLength: 750, | ||
label: 'number', | ||
required: true, | ||
size: 'mini', | ||
autoComplete: 'nope', | ||
}, | ||
{ | ||
name: 'complement', | ||
maxLength: 750, | ||
label: 'floorAndLetter', | ||
size: 'large', | ||
}, | ||
{ | ||
hidden: true, | ||
name: 'reference', | ||
maxLength: 750, | ||
label: 'reference', | ||
size: 'xlarge', | ||
}, | ||
{ | ||
hidden: true, | ||
name: 'neighborhood', | ||
maxLength: 100, | ||
label: 'neighborhood', | ||
size: 'large', | ||
}, | ||
{ | ||
name: 'city', | ||
maxLength: 100, | ||
label: 'city', | ||
required: true, | ||
size: 'large', | ||
}, | ||
{ | ||
name: 'state', | ||
maxLength: 100, | ||
label: 'province', | ||
required: true, | ||
size: 'large', | ||
}, | ||
{ | ||
name: 'receiverName', | ||
elementName: 'receiver', | ||
maxLength: 750, | ||
label: 'receiverName', | ||
size: 'xlarge', | ||
required: true, | ||
}, | ||
], | ||
geolocation: { | ||
postalCode: { | ||
valueIn: 'long_name', | ||
types: ['postal_code'], | ||
required: false, | ||
}, | ||
|
||
number: { | ||
valueIn: 'long_name', | ||
types: ['street_number'], | ||
required: false, | ||
notApplicable: false, | ||
}, | ||
|
||
street: { valueIn: 'long_name', types: ['route'] }, | ||
|
||
neighborhood: { | ||
valueIn: 'long_name', | ||
types: ['neighborhood'], | ||
}, | ||
|
||
state: { | ||
valueIn: 'long_name', | ||
types: ['administrative_area_level_1'], | ||
}, | ||
|
||
city: { | ||
valueIn: 'long_name', | ||
types: ['administrative_area_level_2', 'locality'], | ||
}, | ||
|
||
receiverName: { | ||
required: true, | ||
}, | ||
}, | ||
summary: [ | ||
[ | ||
{ name: 'street' }, | ||
{ delimiter: ' ', name: 'number' }, | ||
{ delimiter: ' ', name: 'complement' }, | ||
], | ||
[ | ||
{ name: 'postalCode' }, | ||
{ delimiter: ' ', name: 'city' }, | ||
{ delimiter: ' (', name: 'state', delimiterAfter: ')' }, | ||
], | ||
], | ||
} |