@kontent-ai/smart-link
Version:
Kontent.ai Smart Link SDK allowing to automatically inject [smart links](https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/set-up-editing-from-preview#a-using-smart-links) to Kontent.ai according to manually specified [HTML data attri
30 lines (29 loc) • 990 B
TypeScript
import { KSLCustomElement } from "./KSLCustomElement";
export declare enum ElementPositionOffset {
Bottom = "bottom",
BottomEnd = "bottom-end",
BottomStart = "bottom-start",
Left = "left",
LeftEnd = "left-end",
LeftStart = "left-start",
None = "",
Right = "right",
RightEnd = "right-end",
RightStart = "right-start",
Top = "top",
TopEnd = "top-end",
TopStart = "top-start"
}
export interface IPositionable {
readonly adjustPosition: () => void;
}
export declare abstract class KSLPositionedElement extends KSLCustomElement implements IPositionable {
get position(): string;
protected targetRef: HTMLElement | null;
connectedCallback(): void;
disconnectedCallback(): void;
attachTo(element: HTMLElement): void;
protected calculateTopOffset(thisRect: DOMRect, targetRect: DOMRect): number;
protected calculateLeftOffset(thisRect: DOMRect, targetRect: DOMRect): number;
abstract adjustPosition(): void;
}