@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
37 lines (36 loc) • 1.31 kB
TypeScript
import { KSLPositionedElement } from './abstract/KSLPositionedElement';
import { HighlightType } from '../utils/dataAttributes/elementHighlight';
import { ParseResult } from '../utils/dataAttributes/parser';
interface IKSLHighlightElementEventData {
readonly data: ParseResult;
readonly targetNode: HTMLElement;
}
export type KSLHighlightElementEvent = CustomEvent<IKSLHighlightElementEventData>;
declare global {
interface WindowEventMap {
'ksl:highlight:edit': KSLHighlightElementEvent;
}
interface HTMLElementEventMap {
'ksl:highlight:edit': KSLHighlightElementEvent;
}
}
export declare class KSLHighlightElement extends KSLPositionedElement {
static get is(): "ksl-highlight";
get type(): HighlightType;
get selected(): boolean;
set selected(value: boolean);
private readonly editButtonRef;
constructor();
static initializeTemplate(): HTMLTemplateElement;
private static getEditButtonTooltip;
connectedCallback(): void;
disconnectedCallback(): void;
attachTo: (node: HTMLElement) => void;
adjustPosition: () => void;
private unregisterTargetNodeListeners;
private handleTargetNodeMouseEnter;
private handleTargetNodeMouseLeave;
private handleEditButtonClick;
private dispatchEditEvent;
}
export {};