@agendize/design-system
Version:
Agendize web design system
54 lines • 1.83 kB
TypeScript
import { Ref } from "vue";
import { AddressObject } from "./Address";
import { Mandatory } from "../viewModel";
export interface AddressProps {
mapBoxToken: string;
modelValue: AddressObject;
mandatory: Mandatory;
useBrowserGeolocation?: boolean;
defaultCountry?: string;
noMap?: boolean;
}
export interface AddressPreview {
id?: string;
street?: string;
zipCode?: string;
city?: string;
country?: string;
countryCode?: string;
}
export declare function AddressModel(mapBoxToken: string, modelValue: AddressObject, emitter: Function, mandatory: Mandatory, useBrowserGeolocation?: boolean, defaultCountry?: string, addressRef?: Ref): AddressModelType;
export interface AddressModelType {
street: Ref<string>;
street2: Ref<string>;
zipCode: Ref<string>;
city: Ref<string>;
state: Ref<string>;
country: Ref<string>;
addressPreviewList: Ref<AddressPreview[]>;
switchToManual: () => void;
addressAutoCompleteDisable: Ref<boolean>;
streetValueUpdate: (value: string) => void;
suggestionSelected: (item: AddressPreview) => void;
streetPlaceholder: Ref<string>;
mapRef: Ref<HTMLElement>;
displayAllFields: Ref<boolean>;
adjustPinMode: Ref<boolean>;
switchToAdjustPinMode: () => void;
savePinPosition: () => void;
cancelAdjustPin: () => void;
countriesValues: Ref<{
value: string;
label: string;
}[]>;
onStreet2Update: (value: string) => void;
onZipCodeUpdate: (value: string) => void;
onCityUpdate: (value: string) => void;
onStateUpdate: (value: string) => void;
onCountryUpdate: (value?: string) => void;
checkField: () => boolean;
reloadGeolocMode: Ref<boolean>;
geolocLoading: Ref<boolean>;
reloadGeoloc: () => void;
}
//# sourceMappingURL=viewModel.d.ts.map