/** * SmartForm layout — pages and window positions of one SmartForm. * * SAP side: ZMCP_ADT_DISPATCH action SSF_LAYOUT → FM ZMCP_SSF_LAYOUT * (sc4sap/abap/zmcp_ssf_layout.abap). The FM reads the Form Builder object * model in display mode and returns every coordinate raw with its own unit. * This module converts the coordinates to millimetres and names the window * types. Runs over every RFC backend that serves callDispatch (OData on * BASIS 7.40, SOAP RFC on BASIS 7.31). */ import type { IAbapConnection } from '@babamba2/mcp-abap-adt-interfaces'; export declare const DEFAULT_LPI = 6; export declare const DEFAULT_CPI = 10; export declare const SSF_LAYOUT_INSTALL_HINT: string; export declare function windowTypeName(code: string): string; /** * Convert a SmartForm length to millimetres. LN (lines) uses LPI, CH * (characters) uses CPI of the page variant. Unknown unit or value → null. */ export declare function toMm(value: unknown, unit: unknown, lpi?: number, cpi?: number): number | null; export interface LengthValue { value: number | null; unit: string; } export interface SmartFormWindow { name: string; caption: string; type: string; typeCode: string; level: number | null; left?: LengthValue; top?: LengthValue; width?: LengthValue; height?: LengthValue; leftMm?: number | null; topMm?: number | null; widthMm?: number | null; heightMm?: number | null; frame?: LengthValue; shading?: number; alwaysDrawBox?: boolean; } export interface SmartFormPage { variant: string; name: string; caption: string; format: string; orientation: string; nextPage: string; printMode: string; cpi: number; lpi: number; stdStyle: string; windows: SmartFormWindow[]; } export interface SmartFormLayout { form: string; language: string; masterLanguage: string; /** false = never activated, read from the saved version; null = not reported. */ active: boolean | null; pages: SmartFormPage[]; path: string; } /** Map the raw ZMCP_SSF_LAYOUT JSON to the tool output (pages flattened). */ export declare function mapSmartFormLayout(raw: any, path: string): SmartFormLayout; /** * Normalise the `language` argument: a 1-char SAP language key is passed * as-is (keys are case-sensitive), a 2-letter ISO code is upper-cased and * converted on the SAP side (CONVERSION_EXIT_ISOLA_INPUT). Empty → '' * (master language of the form). Anything else throws. */ export declare function normalizeSmartFormLanguage(language: unknown): string; /** * Turn a dispatcher failure into an actionable message. callDispatch throws * `ZMCP_ADT_DISPATCH error (action=…, subrc=N): ` on subrc ≠ 0. * The install hint is given only when the error clearly means "not * installed": the dispatcher does not know the action, the dispatcher FM * itself is missing, or ZMCP_SSF_LAYOUT is not found. */ export declare function translateSmartFormLayoutError(error: unknown, formName: string): string; export declare function getSmartFormLayout(connection: IAbapConnection, formName: string, language?: string): Promise; //# sourceMappingURL=smartFormLayout.d.ts.map