feat: address composite field (#4492)

Added new Address field input type.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
rostaklein
2024-03-28 16:50:38 +01:00
committed by GitHub
parent 22d4af2e0c
commit 3171d0c87b
56 changed files with 1839 additions and 716 deletions

View File

@ -8,6 +8,7 @@ import {
IconKey,
IconLink,
IconMail,
IconMap,
IconNumbers,
IconPhone,
IconRelationManyToMany,
@ -101,4 +102,18 @@ export const SETTINGS_FIELD_TYPE_CONFIGS: Record<
Icon: IconUser,
defaultValue: { firstName: 'John', lastName: 'Doe' },
},
[FieldMetadataType.Address]: {
label: 'Address',
Icon: IconMap,
defaultValue: {
addressStreet1: '456 Oak Street',
addressStreet2: 'Unit 3B',
addressCity: 'Springfield',
addressState: 'California',
addressCountry: 'United States',
addressPostcode: '90210',
addressLat: 34.0522,
addressLng: -118.2437,
},
},
};

View File

@ -66,6 +66,7 @@ const previewableTypes = [
FieldMetadataType.Rating,
FieldMetadataType.Relation,
FieldMetadataType.Text,
FieldMetadataType.Address,
];
export const SettingsDataModelFieldSettingsFormCard = ({