import { type IAttribute, type IExecutionDefinition } from "@gooddata/sdk-model"; import { type IResolvedReferenceValues, type ITooltipExecution } from "@gooddata/sdk-ui-vis-commons"; import { type JsonValue } from "../../utils/guards.js"; /** * Returns the lookup key for a hovered feature in the same format * `buildLookupTable` produces — or `null` if the feature lacks the data * needed to build a stable key. * * @internal */ export type BuildFeatureKey = (properties: GeoJSON.GeoJsonProperties) => string | null; /** * @internal */ export interface IGeoLayerCustomTooltipExecution { execution: ITooltipExecution; buildFeatureKey: BuildFeatureKey; } /** * Lives here (not in the hook file) to break a circular import with * `adapterTypes.ts`. * * @internal */ export interface IGeoLayerTooltipLookup { lookup: Map; buildFeatureKey: BuildFeatureKey; } /** * Returned localIdentifiers follow `bucketNames` order — both the row dim and * the hover-time key segment order rely on it. * * @internal */ export declare function getAttributeLocalIdsFromBuckets(definition: IExecutionDefinition, bucketNames: readonly string[]): string[]; /** * Narrow a tooltip attribute payload (e.g. `feature.properties.locationName`) * to its identifying fields. `attrId === undefined` signals "no stable key for * this feature" — callers compare against the expected layer attribute id. * * `attrLocalId` is the execution-local identifier, which is what the tooltip lookup key is * built from: an LDM id is unique only within an object type, so a label and a computed * attribute can share one (see `buildKeySegment`). * * Reuses `parseTooltipPayload` so the JSON-string-or-object handling stays in * one place (MapLibre stringifies complex GeoJSON property values when they * round-trip through `queryRenderedFeatures`). * * @internal */ export declare function readAttrIdentity(payload: JsonValue | undefined): { attrId?: string; attrLocalId?: string; uri: string; }; /** * URI refs return `undefined` — the tooltip-execution backend path can't * resolve uriRef display forms, so the caller must skip that layer. * For payload bookkeeping that accepts either ref kind, use {@link getAttributeRefId}. * * @internal */ export declare function getAttributeIdRefIdentifier(attribute: IAttribute | undefined): string | undefined; /** * Returns identifier for idRef, uri for uriRef — a stable key for feature * payloads whichever ref kind the layer uses. * * @internal */ export declare function getAttributeRefId(attribute: IAttribute | undefined): string | undefined; /** * Returns the idRef identifier of the first attribute in `bucketName`, or * `undefined` when the bucket is missing, has no attribute, or its display form * is a uriRef (uriRefs can't form a tooltip lookup key, so callers skip them). * * @internal */ export declare function getBucketAttributeIdRefIdentifier(definition: IExecutionDefinition, bucketName: string): string | undefined; //# sourceMappingURL=customTooltipExecution.d.ts.map