import * as DG from 'datagrok-api/dg'; import { Observable } from 'rxjs'; /** The shape shared by the `getParams()`-style dialog editors (`@datagrok-libraries/ml`'s * DimReductionBaseEditor, ActivityCliffsEditor, and package-local ones): a plain widget builder * exposing `getParams()` plus optional history serialization. */ export interface ParamsEditorLike { getEditor(): HTMLElement; getParams(): TParams; getStringInput?(): string; applyStringInput?(input: string): void | Promise; } export interface FuncCallParamsEditorOptions { /** The wrapped params-producing editor. */ inner: ParamsEditorLike; /** Maps `inner.getParams()` to a `{funcInputName: value}` record written into the funccall. */ map: (params: TParams) => Record; /** Returns whether the current selection is sufficient to enable OK / run the funccall. */ isValid: (params: TParams) => boolean; /** Stable top-level inputs whose `onChanged` should trigger a re-sync. The library editors * regenerate some inputs on the fly; the DOM-level listener below is the catch-all for those. */ stableInputs?: (DG.InputBase | null | undefined)[]; /** Extra package-specific inputs appended below the wrapped editor. */ extraInputs?: { name: string; input: DG.InputBase; }[]; /** Optional `propertyName -> InputBase` mapping backing `FuncCallEditor.inputFor`. */ inputFor?: Record; } /** Adapts a `getParams()`-style dialog editor to the canonical `DG.FuncCallEditor` contract: it * renders the wrapped editor, mirrors its current parameters into the live funccall's inputs on * every change, and lets the platform own the dialog + execution. * * Change detection is layered because the wrapped editors regenerate some of their inputs and their * gear-icon settings dialogs mutate options without firing any input event: * 1. subscriptions on the stable top-level inputs (primary signal), * 2. bubbling `input`/`change`/`click` DOM listeners on the editor root (catches regenerated * inputs and settings gears), * 3. a pure read in `isValid`, which the platform evaluates right before enabling/running OK. */ export declare class FuncCallParamsEditor extends DG.FuncCallEditor { private funcCall; private opts; private inputChangedSubject; constructor(funcCall: DG.FuncCall, opts: FuncCallParamsEditorOptions); /** Writes the wrapped editor's current parameters into the live funccall and notifies the platform. */ private syncCall; get isValid(): boolean; inputFor(propertyName: string): DG.InputBase; getHistoryString(): string; loadHistoryString(historyString: string): void; get onInputChanged(): Observable; } /** A minimal invalid editor used when preconditions fail (e.g. no suitable column present): * shows a message and keeps OK disabled. */ export declare class MessageFuncCallEditor extends DG.FuncCallEditor { private inputChangedSubject; constructor(message: string); get isValid(): boolean; get onInputChanged(): Observable; } //# sourceMappingURL=func-call-params-editor.d.ts.map