import { AllowedComponentProps } from 'vue'; import { Carrier } from '@myparcel/sdk'; import { CarrierName } from '@myparcel/constants'; import { ComponentCustomProps } from 'vue'; import { ComponentOptionsMixin } from 'vue'; import { ComputedRef } from 'vue'; import { Control } from 'leaflet'; import { CreatedForm } from '@myparcel/vue-form-builder'; import { DateLike } from '@vueuse/core'; import { DeepReadonly } from 'vue'; import { DefineComponent } from 'vue'; import { DeliveryOption } from '@myparcel/sdk'; import { DeliveryOptionsParameters } from '@myparcel/sdk'; import { DeliveryTypeName } from '@myparcel/constants'; import { EndpointParameters } from '@myparcel/sdk'; import { ExtractPropTypes } from 'vue'; import { GetDeliveryOptions } from '@myparcel/sdk'; import { InteractiveElementInstance } from '@myparcel/vue-form-builder'; import { MakeOptional } from '@myparcel/ts-utils'; import { Map as Map_2 } from 'leaflet'; import { Marker } from 'leaflet'; import { MarkerOptions } from 'leaflet'; import { MaybeRef } from 'vue'; import { MaybeRef as MaybeRef_2 } from '@vueuse/core'; import { PackageTypeName } from '@myparcel/constants'; import { PossibleShipmentOption } from '@myparcel/sdk'; import { PromiseOr } from '@myparcel/ts-utils'; import { PropType } from 'vue'; import { PublicProps } from 'vue'; import { Ref } from 'vue'; import { RendererElement } from 'vue'; import { RendererNode } from 'vue'; import { Replace } from '@myparcel/ts-utils'; import { ShallowUnwrapRef } from 'vue'; import { ShipmentOptionName } from '@myparcel/constants'; import { Slot } from 'vue'; import { StartEndDate } from '@myparcel/sdk'; import { TileLayer } from 'leaflet'; import { UnwrapRef } from 'vue'; import { UseMemoizeReturn } from '@vueuse/core'; import { VNode } from 'vue'; import { VNodeProps } from 'vue'; declare type __VLS_NonUndefinedable = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_2 = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_3 = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_4 = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_5 = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_6 = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_7 = T extends undefined ? never : T; declare type __VLS_Prettify = { [K in keyof T]: T[K]; } & {}; declare type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_2 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_2>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_3 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_3>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_4 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_4>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_5 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_5>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_6 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_6>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_7 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_7>; } : { type: PropType; required: true; }; }; declare type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify : P[K]; }; declare type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_2 = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_3 = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_4 = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_5 = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_6 = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_7 = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_8 = T & { new (): { $slots: S; }; }; export declare enum AddressField { Country = 'cc', City = 'city', Number = 'number', PostalCode = 'postalCode', Street = 'street', } declare type AnyTranslatable = string | Translatable | TranslatableWithArgs | Untranslatable; declare interface BaseAddress { [AddressField.Country]: string; [AddressField.City]: string; [AddressField.PostalCode]: string; } declare interface BaseOutput { carrier: CarrierIdentifier; date?: string; deliveryType: DeliveryTypeName; isPickup: boolean; packageType: PackageTypeName; shipmentOptions: ShipmentOptionsOutput; } declare interface BaseSelectOption { carrier?: CarrierIdentifier; disabled?: boolean; ecoFriendly?: number; icon?: string; image?: string; label?: AnyTranslatable; price?: number; selected?: boolean; value: Value; } declare interface BaseTranslatable { key: string; } export declare const bootDeliveryOptions: () => void; export declare const calculateCutoffTime: (carrier: UseResolvedCarrier) => TimestampString; export declare const calculateDropOffDays: (carrier: UseResolvedCarrier) => string | undefined; export declare const calculatePackageType: ({ carrier, packageTypes, }: UseResolvedCarrier) => SupportedPackageTypeName | undefined; export declare const CaretLeftIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; export declare const CaretRightIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; export declare const CarrierBoxLoader: __VLS_WithTemplateSlots_5>, {}, {}>, { default?(_: {}): any; }>; declare interface CarrierConfiguration { addressFields?: string[]; deliveryCountries?: string[]; deliveryTypes: SupportedDeliveryTypeName[]; /** * Enable to use empty delivery options (without calling the API) for this carrier in all countries that are not in * deliveryCountries. */ fakeDelivery?: boolean; /** * Countries to NOT use fake delivery for if fakeDelivery is enabled. */ fakeDeliveryBlacklist?: string[]; features?: ConfigKey[]; name: CarrierName; packageTypes: SupportedPackageTypeName[]; pickupCountries?: string[]; /** * Shipments options that are supported for specific package types. */ shipmentOptionsPerPackageType?: Partial>; smallPackagePickupCountries?: string[]; subscription: SubscriptionType; /** * Parameters that are not supported by the carrier and should be removed from the request. */ unsupportedParameters?: (keyof DeliveryOptionsParameters | string)[]; } declare type CarrierIdentifier = `${CarrierName}:${number}` | CarrierName; export declare const CarrierLogoLoader: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; export declare enum CarrierSetting { AllowDeliveryOptions = 'allowDeliveryOptions', AllowEveningDelivery = 'allowEveningDelivery', AllowMondayDelivery = 'allowMondayDelivery', AllowMorningDelivery = 'allowMorningDelivery', AllowOnlyRecipient = 'allowOnlyRecipient', AllowPickupLocations = 'allowPickupLocations', AllowSameDayDelivery = 'allowSameDayDelivery', AllowSaturdayDelivery = 'allowSaturdayDelivery', AllowSignature = 'allowSignature', AllowStandardDelivery = 'allowStandardDelivery', AllowExpressDelivery = 'allowExpressDelivery', Collect = 'collect', CutoffTime = 'cutoffTime', CutoffTimeSameDay = 'cutoffTimeSameDay', DeliveryDaysWindow = 'deliveryDaysWindow', DropOffDays = 'dropOffDays', DropOffDelay = 'dropOffDelay', PackageType = 'packageType', PriceEveningDelivery = 'priceEveningDelivery', PriceMondayDelivery = 'priceMondayDelivery', PriceMorningDelivery = 'priceMorningDelivery', PriceOnlyRecipient = 'priceOnlyRecipient', PricePackageTypeDigitalStamp = 'pricePackageTypeDigitalStamp', PricePackageTypeMailbox = 'pricePackageTypeMailbox', PricePackageTypePackageSmall = 'pricePackageTypePackageSmall', PricePickup = 'pricePickup', PriceSameDayDelivery = 'priceSameDayDelivery', PriceExpressDelivery = 'priceExpressDelivery', PriceSaturdayDelivery = 'priceSaturdayDelivery', PriceSignature = 'priceSignature', PriceStandardDelivery = 'priceStandardDelivery', } declare interface CarrierSettings extends Partial> { allowDeliveryOptions?: boolean | FilterableOption; allowEveningDelivery?: boolean | FilterableOption; allowExpressDelivery?: boolean | FilterableOption; allowMondayDelivery?: boolean; allowMorningDelivery?: boolean | FilterableOption; allowOnlyRecipient?: boolean; allowPickupLocations?: boolean | FilterableOption; allowSameDayDelivery?: boolean; allowSaturdayDelivery?: boolean; allowSignature?: boolean; allowStandardDelivery?: boolean | FilterableOption; cutoffTime?: TimestampString; cutoffTimeSameDay?: TimestampString; deliveryDaysWindow?: number; dropOffDays?: DropOffEntryObject[]; dropOffDelay?: number; packageType?: SupportedPackageTypeName; priceEveningDelivery?: Price; priceExpressDelivery?: Price; priceMondayDelivery?: Price; priceMorningDelivery?: Price; priceOnlyRecipient?: Price; pricePackageTypeDigitalStamp?: Price; pricePackageTypeMailbox?: Price; pricePackageTypePackageSmall?: Price; pricePickup?: Price; priceSameDayDelivery?: Price; priceSaturdayDelivery?: Price; priceSignature?: Price; priceStandardDelivery?: Price; } declare type CarrierSettingsKey = CarrierSetting; declare type CarrierSettingsObject = Partial>; declare interface CarrierWithIdentifier extends Carrier { identifier: CarrierIdentifier; } declare type CheckboxGroupEmits = ElementEmits; export declare const CheckboxGroupInput: (__VLS_props: { modelValue: unknown; element: ElementInstance>, unknown>; "onUpdate:modelValue"?: ((value: T) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: { attrs: any; slots: Readonly> & GroupInputSlots; emit: CheckboxGroupEmits; } | undefined, __VLS_expose?: ((exposed: ShallowUnwrapRef< {}>) => void) | undefined, __VLS_setup?: Promise<{ props: { modelValue: unknown; element: ElementInstance>, unknown>; "onUpdate:modelValue"?: ((value: T) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; expose(exposed: ShallowUnwrapRef< {}>): void; attrs: any; slots: Readonly> & GroupInputSlots; emit: CheckboxGroupEmits; }>) => VNode & { __ctx?: { props: { modelValue: unknown; element: ElementInstance>, unknown>; "onUpdate:modelValue"?: ((value: T) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; expose(exposed: ShallowUnwrapRef< {}>): void; attrs: any; slots: Readonly> & GroupInputSlots; emit: CheckboxGroupEmits; } | undefined; }; declare type CheckboxGroupModelValue = string[]; declare type CheckboxGroupProps = InputProps & OptionsProps; declare type ComputedAsync = WithLoadingProperties>; declare type ConfigKey = ConfigSetting | CarrierSettingsKey; declare type ConfigPriceKey = Extract; export declare enum ConfigSetting { ApiBaseUrl = 'apiBaseUrl', Currency = 'currency', Locale = 'locale', PickupLocationsDefaultView = 'pickupLocationsDefaultView', AllowPickupLocationsViewSelection = 'allowPickupLocationsViewSelection', PickupLocationsMapTileLayerData = 'pickupLocationsMapTileLayerData', PickupMapAllowLoadMore = 'pickupMapAllowLoadMore', PickupShowDistance = 'pickupShowDistance', Platform = 'platform', ShowDeliveryDate = 'showDeliveryDate', ShowPriceSurcharge = 'showPriceSurcharge', ShowPrices = 'showPrices', ShowPriceZeroAsFree = 'showPriceZeroAsFree', ClosedDays = 'closedDays', ExcludeParcelLockers = 'excludeParcelLockers', } export declare const createCarrierMarkerIcon: UseMemoizeReturn; declare type CreateDateFormatter = (locale: string, options?: Intl.DateTimeFormatOptions) => DateFormatterFunction; /** * Create fake shipment options based on carrier configuration */ export declare const createFakeShipmentOptions: (carrier: UseResolvedCarrier, packageType: SupportedPackageTypeName) => PossibleShipmentOption[]; export declare const createGetDeliveryOptionsParameters: (resolvedCarrier: UseResolvedCarrier, additionalParameters?: undefined | Partial>) => EndpointParameters; export declare const createLatLngParameters: (latLng?: T) => Pick, 'latitude' | 'longitude'> | undefined; /** * Return the next date for a given weekday. If the given weekday is today, returns today. */ export declare const createNextDate: (weekday: number) => Date; export declare const createPackageTypeTranslatable: (packageType: PackageTypeName) => Translatable; export declare const createRelativeDateFormatter: CreateDateFormatter; export declare const createUtcDate: (date?: DateLike) => Date; export declare enum CustomDeliveryType { SameDay = 'same_day', Monday = 'monday', Saturday = 'saturday', } declare type DateFormatterFunction = (date: Date) => string; export declare const DATES_SHOWN_MD = 4; export declare const DATES_SHOWN_SM = 2; /** * Enable date/time selection for these package types. */ export declare const DELIVERY_MOMENT_PACKAGE_TYPES: PackageTypeName[]; declare type DeliveryDeliveryType = DeliveryTypeName.Standard | DeliveryTypeName.Evening | DeliveryTypeName.Morning; declare interface DeliveryOptionsAddress extends BaseAddress { [AddressField.Street]: string; } export declare interface DeliveryOptionsConfig extends Partial>, CarrierSettings { allowPickupLocationsViewSelection: boolean; apiBaseUrl: string; carrierSettings: CarrierSettingsObject; closedDays: Date[]; /** * Currency. Defaults to format of the browser. */ currency: string | undefined; /** * Locale. Defaults to the language of the browser. */ locale: string | undefined; pickupLocationsDefaultView: PickupLocationsView; pickupLocationsMapTileLayerData: string | MapTileLayerData; pickupShowDistance: boolean; platform: SupportedPlatformName; showDeliveryDate: boolean; showPriceSurcharge: boolean; showPriceZeroAsFree: boolean; showPrices: boolean; } export declare interface DeliveryOptionsConfiguration { address: DeliveryOptionsAddress; config: DeliveryOptionsConfig; initial: Partial; platformConfig: PlatformConfiguration; strings: DeliveryOptionsStrings; } export declare type DeliveryOptionsEmits = (event: 'update', values: DeliveryOptionsOutput) => void; declare type DeliveryOptionsOutput = DeliveryOutput | PickupOutput; export declare interface DeliveryOptionsProps { configuration?: InputDeliveryOptionsConfiguration; } /** * Define a generic type for the store where the update method accepts a payload and an array of arguments */ export declare type DeliveryOptionsStore = { state: UnwrapRef; update: (payload: U, ...args: A) => void; reset: () => void; }; declare type DeliveryOptionsStrings = Record; declare interface DeliveryOutput extends BaseOutput { deliveryType: DeliveryDeliveryType; isPickup: false; } declare interface DeprecatedConfigOptions { /** @deprecated use ShowDeliveryDate instead */ allowShowDeliveryDate?: boolean; /** @deprecated use dropOffDays instead */ fridayCutoffTime?: TimestampString; /** @deprecated use dropOffDays instead */ saturdayCutoffTime?: TimestampString; } /** * Disable the delivery options. */ export declare const DISABLE_DELIVERY_OPTIONS = "myparcel_disable_delivery_options"; export declare const DoButton: __VLS_WithTemplateSlots, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>>, {}, {}>, { default?(_: {}): any; }>; export declare type DropOffEntry = Weekday | DropOffEntryObject; export declare type DropOffEntryObject = { weekday: Weekday | `${Weekday}`; cutoffTimeSameDay?: string; cutoffTime?: string; }; export declare const EcoFriendlyIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; export declare const EcoFriendlyLabel: DefineComponent<__VLS_TypePropsToRuntimeProps_2<{ amount: number; id: string; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>>, {}, {}>; declare type ElementEmits = (name: 'update:modelValue', value: Type) => void; declare type ElementInstance = InteractiveElementInstance< Type, Props & GlobalFieldProps >; /** * Used to send error events to the external platform. */ export declare const ERROR_DELIVERY_OPTIONS = "myparcel_error_delivery_options"; /** * Stores the selected carrier for pickup. */ export declare const FIELD_CARRIER = "carrier"; /** * Stores the selected delivery date for home delivery. */ export declare const FIELD_DELIVERY_DATE = "deliveryDate"; /** * Stores the selected delivery moment for home delivery. */ export declare const FIELD_DELIVERY_MOMENT = "deliveryMoment"; /** * Stores whether home delivery or pickup is selected. */ export declare const FIELD_HOME_OR_PICKUP = "homeOrPickup"; /** * Stores the selected pickup location if pickup is selected. */ export declare const FIELD_PICKUP_LOCATION = "pickupLocation"; /** * Stores the selected shipment options for home delivery. */ export declare const FIELD_SHIPMENT_OPTIONS = "shipmentOptions"; export declare interface FilterableOption { allow: boolean; items: string[]; } declare interface FormattedDateInstance { date: ComputedRef; day: ComputedRef; month: ComputedRef; relative: ComputedRef; relativeWeekday: ComputedRef; standard: ComputedRef; time: ComputedRef; weekday: ComputedRef; } export declare const getConfigFromWindow: () => InputDeliveryOptionsConfiguration; export declare const getConfigPriceKey: (input: SupportedDeliveryTypeName | SupportedShipmentOptionName) => ConfigPriceKey; export declare const getDefaultAddress: () => DeliveryOptionsAddress; export declare const getDeliveryTypePrice: (deliveryType: SupportedDeliveryTypeName, carrier?: CarrierIdentifier) => number; export declare const getResolvedCarrier: (carrierIdentifier: CarrierIdentifier | undefined, platformName: SupportedPlatformName) => UseResolvedCarrier; /** * Gets an available non-standard delivery type based on the delivery date. */ export declare const getResolvedDeliveryType: UseMemoizeReturn; export declare const getResolvedValue: >>(key: T, carrierIdentifier?: CarrierIdentifier, defaultValue?: Default) => Default extends any ? NonNullable> | Default : ResolvedValue; declare type GlobalFieldProps = { description?: string; subtext?: string; value?: unknown; }; export declare const GroupInput: (__VLS_props: { id: string; options: SelectOption[]; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: { attrs: any; slots: Readonly> & GroupInputSlots; emit: any; } | undefined, __VLS_expose?: ((exposed: ShallowUnwrapRef< {}>) => void) | undefined, __VLS_setup?: Promise<{ props: { id: string; options: SelectOption[]; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; expose(exposed: ShallowUnwrapRef< {}>): void; attrs: any; slots: Readonly> & GroupInputSlots; emit: any; }>) => VNode & { __ctx?: { props: { id: string; options: SelectOption[]; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; expose(exposed: ShallowUnwrapRef< {}>): void; attrs: any; slots: Readonly> & GroupInputSlots; emit: any; } | undefined; }; export declare const GroupInputLoader: __VLS_WithTemplateSlots_4, { rows: number; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly, { rows: number; }>>>, { rows: string | number; }, {}>, { input?(_: {}): any; default?(_: {}): any; }>; export declare interface GroupInputSlots { content: OptionSlotProp; default: OptionSlotProp; input: OptionSlotProp; right: OptionSlotProp; } export declare const hasSlotContent: (slot: Slot | undefined, slotProps?: {}) => boolean; /** * Manually hide the delivery options. */ export declare const HIDE_DELIVERY_OPTIONS = "myparcel_hide_delivery_options"; export declare const HOME_OR_PICKUP_HOME = "home"; export declare const HOME_OR_PICKUP_PICKUP = "pickup"; export declare const IconButton: __VLS_WithTemplateSlots_2>, {}, {}>, { default?(_: {}): any; }>; export declare const Icons: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; export declare const InfoLabel: __VLS_WithTemplateSlots_3, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>>, {}, {}>, { default?(_: {}): any; }>; export declare interface InputCarrierSettings extends Omit, DeprecatedConfigOptions { dropOffDays?: DropOffEntry[] | string; } export declare type InputCarrierSettingsObject = Partial>; /** * Includes deprecated options which will be filtered out. */ export declare type InputDeliveryOptionsConfig = { dropOffDays?: DropOffEntry[] | string; carrierSettings?: InputCarrierSettingsObject; } & Omit, 'carrierSettings' | 'dropOffDays'> & DeprecatedConfigOptions; export declare interface InputDeliveryOptionsConfiguration { address: DeliveryOptionsAddress; config: InputDeliveryOptionsConfig; initial?: Partial; platformConfig: PlatformConfiguration; strings?: DeliveryOptionsStrings; } declare interface InputProps { disabled?: boolean; id?: string | undefined; modelValue: Type; name?: string; readonly?: boolean; } declare type InternalOutput = { homeOrPickup: string; deliveryDate: null | string; /** * JSON encoded SelectedDeliveryMoment * @see SelectedDeliveryMoment */ deliveryMoment: string; shipmentOptions?: ShipmentOptionName[]; /** * Location code. */ pickupLocation?: string; }; export declare const KEY_ADDRESS = 'address' satisfies keyof DeliveryOptionsConfiguration; export declare const KEY_CARRIER_SETTINGS = 'carrierSettings' satisfies keyof DeliveryOptionsConfig; export declare const KEY_CONFIG = 'config' satisfies keyof DeliveryOptionsConfiguration; export declare const KEY_INITIAL = 'initial' satisfies keyof DeliveryOptionsConfiguration; export declare const KEY_STRINGS = 'strings' satisfies keyof DeliveryOptionsConfiguration; export declare type LatLng = undefined | [number, number]; export declare const LeafletMap: __VLS_WithTemplateSlots_6>, {}, {}>, { default?(_: {}): any; }>; export declare const LeafletMapInner: __VLS_WithTemplateSlots_7>, {}, {}>, { default?(_: {}): any; }>; export declare interface LeafletMapProps { center?: [number, number]; height?: string; innerClass?: string | (string | Record)[] | Record; scroll?: boolean | 'center'; zoom?: number; } export declare const LeafletMarker: __VLS_WithTemplateSlots_8, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { click: (marker: MapMarker) => void; }, string, PublicProps, Readonly>> & { onClick?: ((marker: MapMarker) => any) | undefined; }, {}, {}>, { default?(_: {}): any; }>; declare type MakeRequired = Omit & Required>; export declare const MAP_MARKER_CLASS_ACTIVE = "active"; export declare const MAP_MARKER_CLASS_PREFIX = "mp__carrier-marker"; export declare interface MapMarker extends Marker { _leaflet_id: number; } export declare interface MapTileLayerData { attribution: string; maxZoom?: number; token?: string; url: string; } export declare const MyParcelDeliveryOptions: DefineComponent<__VLS_TypePropsToRuntimeProps_7, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { update: (values: DeliveryOptionsOutput) => void; }, string, PublicProps, Readonly>> & { onUpdate?: ((values: DeliveryOptionsOutput) => any) | undefined; }, {}, {}>; export declare interface OpeningHoursEntry { hours: StartEndDate[]; weekday: number; } declare interface OptionSlotProp { option: SelectOption; } declare type OptionsProps = { options: SelectOption[]; }; declare type OptionsProps_2 = { options: SelectOptionWithCarrier[]; }; export declare const OUTPUT_EVENT_DEBOUNCE_DELAY = 10; declare interface OutputPickupLocation { cc: string; city: string; /** @since v6.0.0 */ distance: number; latitude: number; locationCode: string; locationName: string; longitude: number; number: string; numberSuffix: string; postalCode: string; retailNetworkId: string; street: string; /** @since v6.0.0 */ type: PickupLocationType; } export declare const padTime: (input: string | number, length?: number) => string; export declare const ParcelLockerIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; export declare const parseJson: (text: string | undefined) => T; export declare enum PickupLocationsView { Map = 'map', List = 'list', } declare enum PickupLocationType { Default = 'default', Locker = 'locker', } declare interface PickupOutput extends BaseOutput { deliveryType: DeliveryTypeName.Pickup; isPickup: true; pickupLocation: OutputPickupLocation; } declare interface PlatformConfiguration { carriers: CarrierConfiguration[]; } export declare interface PlatformInstance extends UsePlatform { name: ComputedRef; } declare type Price = number | null; export declare const PriceTag: DefineComponent<__VLS_TypePropsToRuntimeProps_4<{ price: number; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>>, {}, {}>; export declare const RadioButtonLoader: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; declare type RadioGroupEmits = ElementEmits; export declare const RadioGroupInput: (__VLS_props: { modelValue: unknown; element: ElementInstance>, unknown>; "onUpdate:modelValue"?: ((value: T) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: { attrs: any; slots: Readonly> & GroupInputSlots; emit: RadioGroupEmits; } | undefined, __VLS_expose?: ((exposed: ShallowUnwrapRef< {}>) => void) | undefined, __VLS_setup?: Promise<{ props: { modelValue: unknown; element: ElementInstance>, unknown>; "onUpdate:modelValue"?: ((value: T) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; expose(exposed: ShallowUnwrapRef< {}>): void; attrs: any; slots: Readonly> & GroupInputSlots; emit: RadioGroupEmits; }>) => VNode & { __ctx?: { props: { modelValue: unknown; element: ElementInstance>, unknown>; "onUpdate:modelValue"?: ((value: T) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; expose(exposed: ShallowUnwrapRef< {}>): void; attrs: any; slots: Readonly> & GroupInputSlots; emit: RadioGroupEmits; } | undefined; }; declare type RadioGroupModelValue = string; declare type RadioGroupProps = InputProps & OptionsProps; /** * Used to (re)render the entire module. */ export declare const RENDER_DELIVERY_OPTIONS = "myparcel_render_delivery_options"; export declare interface ResolvedDeliveryOptions { carrier: CarrierIdentifier; date: undefined | string; deliveryType: DeliveryTypeName; packageType: PackageTypeName; shipmentOptions: DeepReadonly; time: AnyTranslatable; } export declare type ResolvedDeliveryOptionsConfig = MakeRequired< DeliveryOptionsConfig, | ConfigSetting.ApiBaseUrl | ConfigSetting.Currency | ConfigSetting.Locale | ConfigSetting.PickupLocationsDefaultView | ConfigSetting.AllowPickupLocationsViewSelection | ConfigSetting.PickupLocationsMapTileLayerData | ConfigSetting.PickupShowDistance | ConfigSetting.Platform | ConfigSetting.ShowDeliveryDate | ConfigSetting.ShowPriceSurcharge | ConfigSetting.ShowPrices | ConfigSetting.ShowPriceZeroAsFree | ConfigSetting.ClosedDays | CarrierSetting.AllowDeliveryOptions | CarrierSetting.AllowEveningDelivery | CarrierSetting.AllowMondayDelivery | CarrierSetting.AllowMorningDelivery | CarrierSetting.AllowOnlyRecipient | CarrierSetting.AllowPickupLocations | CarrierSetting.AllowSameDayDelivery | CarrierSetting.AllowSignature | CarrierSetting.AllowStandardDelivery | CarrierSetting.DeliveryDaysWindow | CarrierSetting.DropOffDays | CarrierSetting.DropOffDelay | CarrierSetting.PackageType >; export declare interface ResolvedPickupLocation extends OutputPickupLocation { carrier: CarrierIdentifier; openingHours: OpeningHoursEntry[]; } declare type ResolvedValue = T extends ConfigSetting ? DeliveryOptionsConfig[T] : CarrierSettings[T]; export declare interface SelectedDeliveryMoment extends Replace, 'deliveryType', T> { carrier: CarrierIdentifier; } export declare type SelectedDeliveryMomentDelivery = SelectedDeliveryMoment; export declare type SelectedDeliveryMomentPickup = SelectedDeliveryMoment; declare interface SelectOption< Value extends SelectOptionValue = SelectOptionValue, T extends AnyTranslatable = AnyTranslatable, > extends BaseSelectOption { label: T; } declare type SelectOptionValue = string | object | boolean; declare type SelectOptionWithCarrier = MakeRequired, 'carrier'>; declare interface ShipmentOptionsOutput { onlyRecipient?: boolean; signature?: boolean; } /** * Manually show the delivery options. */ export declare const SHOW_DELIVERY_OPTIONS = "myparcel_show_delivery_options"; /** * Output some information in the console to help a developer get started quickly. */ export declare const showDeveloperInfo: () => void; export declare const SHOWN_OPENING_HOURS = 3; export declare const SHOWN_SHIPMENT_OPTIONS: readonly ShipmentOptionName[]; declare type StopCallback = () => void; /** * Convert a date string from the MyParcel API to a timezone ignorant date. */ export declare const stringToDate: (date: string) => Date; declare enum SubscriptionType { Required = 1, Never = 0, Optional = -1, } export declare const SUPPORTED_DELIVERY_TYPES = Object.freeze([ DeliveryTypeName.Standard, DeliveryTypeName.Evening, DeliveryTypeName.Morning, DeliveryTypeName.Pickup, ]); export declare const SUPPORTED_PACKAGE_TYPES = Object.freeze([ PackageTypeName.Package, PackageTypeName.Mailbox, PackageTypeName.DigitalStamp, PackageTypeName.PackageSmall, ]); export declare const SUPPORTED_PLATFORMS = Object.freeze([PlatformName.MyParcel, PlatformName.SendMyParcel]); export declare const SUPPORTED_SHIPMENT_OPTIONS = Object.freeze([ ShipmentOptionName.OnlyRecipient, ShipmentOptionName.Signature, ]); export declare type SupportedDeliveryTypeName = (typeof SUPPORTED_DELIVERY_TYPES)[number] | CustomDeliveryType; export declare type SupportedPackageTypeName = (typeof SUPPORTED_PACKAGE_TYPES)[number]; export declare type SupportedPlatformName = (typeof SUPPORTED_PLATFORMS)[number]; export declare type SupportedShipmentOptionName = (typeof SUPPORTED_SHIPMENT_OPTIONS)[number]; declare type TimestampString = `${number}:${number}` | string; declare type ToRecord = { [K in keyof T]: T[K]; }; export declare const toTime: (date: Date | string) => string; declare interface Translatable extends BaseTranslatable { plain?: false; } declare interface TranslatableWithArgs extends Translatable { args: Record; } /** * Unselect delivery options */ export declare const UNSELECT_DELIVERY_OPTIONS = "myparcel_unselect_delivery_options"; declare interface Untranslatable extends BaseTranslatable { plain: true; } /** * This event is used to change the config after the initialization. */ export declare const UPDATE_CONFIG_IN = "myparcel_update_config"; /** * For the external platform to tell this application to update. If it's a CustomEvent the detail will be used as the * address. */ export declare const UPDATE_DELIVERY_OPTIONS = "myparcel_update_delivery_options"; /** * To tell the external platform the address is updated. */ export declare const UPDATED_ADDRESS = "myparcel_updated_address"; /** * To tell the external platform it needs to update. */ export declare const UPDATED_DELIVERY_OPTIONS = "myparcel_updated_delivery_options"; /** * Get the carriers that are currently active in the delivery options config. */ export declare const useActiveCarriers: UseMemoizeReturn, []>; export declare const useAddressStore: () => DeliveryOptionsStore; export declare const useBreakpoints: UseMemoizeReturn< { sm: ComputedRef; md: ComputedRef; }, []>; export declare const useConfigStore: () => DeliveryOptionsStore; export declare const useCurrentPlatform: () => PlatformInstance; export declare const useDateFormat: (date: MaybeRef) => FormattedDateInstance; export declare const useDeliveryOptionsForm: UseMemoizeReturn, []>; export declare const useDeliveryOptionsIncomingEvents: () => void; export declare const useDeliveryOptionsOutgoingEvents: (emit: DeliveryOptionsEmits) => void; export declare const useFeatures: UseMemoizeReturn< { /** * Only a subset of shipment options is available here */ availableShipmentOptions: ComputedRef; showDeliveryDate: ComputedRef; }, []>; export declare const useFormatDistance: (distance: MaybeRef) => ComputedRef; declare interface UseLanguage { locale: ComputedRef; setLocale(locale: string): void; setStrings(strings: Record): void; translate(translatable: AnyTranslatable): string; } export declare const useLanguage: UseMemoizeReturn; export declare const useMostEcoFriendly: (amount: MaybeRef, group: MaybeRef) => ComputedRef; export declare const useOptionsGroupedByCarrier: (element: MaybeRef>>) => { options: ComputedRef[]>; grouped: ComputedRef<[CarrierIdentifier, SelectOptionWithCarrier[]][]>; }; declare interface UsePickupLocation { pickupLocation: ComputedRef; resolvedCarrier: ComputedRef; } export declare const usePickupLocation: (locationCode: MaybeRef, selectedCarrier: MaybeRef) => UsePickupLocation; declare interface UsePickupLocationsMap { activeMarker: ComputedRef; loaded: ComputedRef; map: Ref; markers: Ref; scaleControl: Ref; center: Ref>; showLoadMoreButton: Ref; tileLayer: Ref; fitBounds(): void; initializeMap(container: Ref, settings?: LeafletMapProps): undefined | StopCallback; } export declare const usePickupLocationsMap: () => UsePickupLocationsMap; declare interface UsePlatform { config: ComputedRef; hasCarrier(carrierIdentifier: CarrierIdentifier): boolean; } export declare const useProvideElementWidth: (element: Ref) => void; export declare type UseResolvedCarrier = { carrier: ComputedAsync; config: ComputedRef; pickupCountries: ComputedRef>; deliveryCountries: ComputedRef>; deliveryTypes: ComputedRef>; disabledDeliveryTypes: Ref>; packageTypes: ComputedRef>; shipmentOptionsPerPackageType: ComputedRef>>>; features: ComputedRef>; hasDelivery: ComputedRef; hasFakeDelivery: ComputedRef; hasAnyDelivery: ComputedRef; hasPickup: ComputedRef; hasSmallPackagePickup: ComputedRef; get(key: Key, defaultValue?: NonNullable): Key extends ConfigKey ? DeliveryOptionsConfig[Key] : CarrierSettings[Key]; options: ComputedRef>; }; export declare const useResolvedCarrier: (carrierIdentifier: MaybeRef_2) => UseResolvedCarrier; export declare const useResolvedDeliveryDates: UseMemoizeReturn, []>; /** * Composable to filters the resolved delivery options based on the selected delivery date. * * As a workaround, it also returns all options without a date (most likely "fake" options), * as there is no place for this in the UI if there are other options *with* dates. * * @returns ComputedRef of ResolvedDeliveryOptions[] */ export declare const useResolvedDeliveryMoments: () => ComputedRef; declare type UseResolvedDeliveryOptions = ComputedAsync; export declare const useResolvedDeliveryOptions: UseMemoizeReturn; declare interface UseResolvedPickupLocations { carriersWithPickup: ComputedRef; locations: ComputedAsync; /** * Load more locations by latitude and longitude. */ loadMoreLocations(latitude: number, longitude: number): Promise; /** * Clear all previously loaded locations. */ reset(): void; } export declare const useResolvedPickupLocations: UseMemoizeReturn; export declare const useResolvedValues: () => ComputedRef; export declare const useSelectedDeliveryMoment: UseMemoizeReturn | undefined>, []>; declare interface UseSelectedPickupLocation { location: ComputedRef; locationCode: Ref; } export declare const useSelectedPickupLocation: () => UseSelectedPickupLocation; declare interface UseSelectedValues { carrier: Ref; clearSelectedValues: () => void; deliveryDate: Ref; deliveryMoment: Ref; homeOrPickup: Ref; pickupLocation: Ref; shipmentOptions: Ref; } export declare const useSelectedValues: UseMemoizeReturn; export declare const useShipmentOptionsOptions: () => ComputedRef; export declare const useTimeRange: (startDate: MaybeRef, endDate: MaybeRef) => ComputedRef; declare type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6; declare type WithLoadingProperties = Ref> = T & { load(): PromiseOr; loading: Loading; }; export { } declare global { export interface Window { MyParcelConfig: InputDeliveryOptionsConfiguration | DeliveryOptionsConfiguration; } }