Skip to content

Commit

Permalink
add props
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrizmaselli committed Jul 22, 2024
1 parent 56f8662 commit bcdb737
Show file tree
Hide file tree
Showing 60 changed files with 650 additions and 119 deletions.
11 changes: 10 additions & 1 deletion react/country/ARE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/ARG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,21 @@ const rules: PostalCodeRules = {
optionsMap: getTwoLevels(countryData),
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
16 changes: 13 additions & 3 deletions react/country/AUS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand All @@ -100,7 +109,8 @@ const rules: PostalCodeRules = {
types: ['route'],
handler: (address, googleAddress) => {
address.street = { value: (googleAddress as { name: string }).name }
return address

return address
},
},

Expand All @@ -123,7 +133,7 @@ const rules: PostalCodeRules = {

city: {
valueIn: 'long_name',
types: ['locality','administrative_area_level_4'],
types: ['locality', 'administrative_area_level_4'],
},

receiverName: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/AUT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/BEL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,21 @@ const rules: PostalCodeRules = {
size: 'xlarge',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/BGR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/BOL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -785,12 +785,21 @@ const rules: PostalCodeRules = {
optionsMap: getThreeLevels(countryData),
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/BRA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,21 @@ const rules: PostalCodeRules = {
],
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/CAN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,21 @@ const rules: PostalCodeRules = {
],
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/CHL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/COL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1277,12 +1277,21 @@ const rules: PostalCodeRules = {
optionsMap: getTwoLevels(countryData),
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/CRI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,21 @@ const rules: PostalCodeRules = {
optionsMap: getThreeLevels(countryData),
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/CZE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/DEU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
11 changes: 10 additions & 1 deletion react/country/DNK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,21 @@ const rules: PostalCodeRules = {
size: 'large',
},
{
hidden: true,
name: 'receiverName',
elementName: 'receiver',
maxLength: 750,
label: 'receiverName',
size: 'xlarge',
required: true,
required: false,
},
{
hidden: true,
name: 'contactId',
maxLength: 100,
label: 'contactId',
size: 'xlarge',
required: false,
},
],
geolocation: {
Expand Down
Loading

0 comments on commit bcdb737

Please sign in to comment.