export default myModule; /** * The POI data extractor is used to extract data from a POI. * The POI is an item of the POI data array. */ export type PoiExtractor = { /** * Extract the id of a POI. */ id: (arg0: unknown) => string; /** * Extract the distance from origin of a POI. */ dist: (arg0: unknown) => number; /** * Extract the elevation of a POI. */ z: (arg0: unknown, arg1: number | undefined) => number; /** * Extract the sequence number of a POI. */ sort: (arg0: unknown) => number; /** * Extract the title of a POI. */ title: (arg0: unknown) => string; }; export type ProfileFormatter = { /** * Format the xhover distance. */ xhover: (arg0: number, arg1: string) => string; /** * Format the yhover elevation. */ yhover: (arg0: number, arg1: string) => string; /** * Format the xtick, for graduating the x axis. */ xtick: (arg0: number, arg1: string) => (string | number); /** * Format the ytick, for graduating the y axis. */ ytick: (arg0: number, arg1: string) => (string | number); }; export type I18n = { /** * Text for the x axis. Will be completed by ` km` or ' m' (for kilometers or meters). */ xAxis?: string; /** * Text for the y axis. Will be completed by ' m' (for meters). */ yAxis?: string; }; /** * Options for the profile. */ export type ProfileOptions = { /** * Formatter giving full control on how numbers are formatted. */ formatter?: ProfileFormatter; /** * Extract the distance from origin of a point (an * item of the elevation data array). */ distanceExtractor: (arg0: T) => number; /** * Extractor for parsing POI data. */ poiExtractor?: PoiExtractor; /** * Allows to modify the raw x * and y scales. Notably, it is possible to modify the y domain according to XY ratio rules, * add padding or enforce y lower bound. */ scaleModifier?: (arg0: Function, arg1: Function, arg2: number, arg3: number) => void; /** * A * callback called from the profile when the mouse moves over a point. The point, an item of the elevation * data array, is passed as the first argument of the function. */ hoverCallback?: (arg0: Object, arg1: number, arg2: string, arg3: { [x: string]: number; }, arg4: string) => void; /** * A callback called from the profile when the mouse leaves the profile. */ outCallback?: () => void; i18n?: I18n; }; /** * The POI data extractor is used to extract data from a POI. * The POI is an item of the POI data array. * * @typedef {Object} PoiExtractor * @property {function(unknown): string} id Extract the id of a POI. * @property {function(unknown): number} dist Extract the distance from origin of a POI. * @property {function(unknown, number=): number} z Extract the elevation of a POI. * @property {function(unknown): number} sort Extract the sequence number of a POI. * @property {function(unknown): string} title Extract the title of a POI. */ /** * @typedef {Object} ProfileFormatter * @property {function(number, string): string} xhover Format the xhover distance. * @property {function(number, string): string} yhover Format the yhover elevation. * @property {function(number, string): (string|number)} xtick Format the xtick, for graduating the x axis. * @property {function(number, string): (string|number)} ytick Format the ytick, for graduating the y axis. */ /** * @typedef {Object} I18n * @property {string} [xAxis] Text for the x axis. Will be completed by ` km` or ' m' (for kilometers or meters). * @property {string} [yAxis] Text for the y axis. Will be completed by ' m' (for meters). */ /** * Options for the profile. * * @typedef {Object} ProfileOptions * @property {ProfileFormatter} [formatter] Formatter giving full control on how numbers are formatted. * @property {function(T): number} distanceExtractor Extract the distance from origin of a point (an * item of the elevation data array). * @property {PoiExtractor} [poiExtractor] Extractor for parsing POI data. * @property {function(Function, Function, number, number): void} [scaleModifier] Allows to modify the raw x * and y scales. Notably, it is possible to modify the y domain according to XY ratio rules, * add padding or enforce y lower bound. * @property {function(Object, number, string, Object, string): void} [hoverCallback] A * callback called from the profile when the mouse moves over a point. The point, an item of the elevation * data array, is passed as the first argument of the function. * @property {function(): void} [outCallback] A callback called from the profile when the mouse leaves the profile. * @property {I18n} [i18n] * @template T */ /** * @type {angular.IModule} * @hidden */ declare const myModule: angular.IModule; import angular from 'angular';