import * as _angular_core from '@angular/core'; import { InjectionToken, OnDestroy } from '@angular/core'; /** * Runtime state attributes the component renders on the same anchor as `data-autoid`. * Every field is OPTIONAL — only present when the component actually renders that attribute. * All values are the raw DOM string (already "true"/"false" or stringified number/value). */ interface AutoidElementState { disabled?: string; loading?: string; empty?: string; invalid?: string; opened?: string; count?: string; /** Serialized DOM `data-value` (NOT `input.value`). Distinct from `AutoidElement.text` field. */ dataValue?: string; required?: string; maxlength?: string; minlength?: string; pattern?: string; errorMessage?: string; type?: string; title?: string; message?: string; } interface AutoidElement { stt: number; name: string; autoid: string; tag: string; /** * Display text resolved from the DOM: `input.value` for form controls, otherwise * `textContent.trim().slice(0, 80)`. Use `state.dataValue` for the serialized * runtime value rendered by `@sdcorejs/angular` components. */ text: string; xpath: string; duplicate: boolean; /** Runtime state attributes read from the DOM. Always an object — may be empty `{}`. */ state: AutoidElementState; /** * `data-autoid` of the closest ancestor `` that contains this element, * or `undefined` if this element is top-level (not inside any `sd-table`). * Used by the UI to group table-scoped elements into a separate section. */ tableScope?: string; /** * `true` when the element matched a required selector (sd-button, sd-input, …) but * had NO `data-autoid` — the scanner still emits it with `autoid: ''` and a positional * `xpath` fallback so the export stays usable. The dev should backfill an autoid. */ missingAutoid?: boolean; /** Human-readable warning attached to a fallback element (only set when `missingAutoid`). */ warning?: string; } interface AutoidMissing { tag: string; selector: string; outerHtmlPreview: string; nameHint: string; } interface AutoidAuditResult { total: number; duplicates: Record; duplicateCount: number; missing: AutoidMissing[]; missingCount: number; } interface SdAutoidInspectorConfiguration { /** Base URL cua backend sinh E2E test, vi du `http://localhost:3012`. */ host?: string; /** Selector phu them can audit (mac dinh component da cover sd-* form + sd-button). */ extraRequireSelectors?: string[]; /** Root scan, mac dinh document.body. */ root?: HTMLElement; } /** Cau hinh global cho AutoId Inspector. `[config]` tren component co the override theo instance. */ declare const SD_AUTOID_INSPECTOR_CONFIGURATION: InjectionToken; type AutoidE2eTarget = 'playwright' | 'robot'; interface AutoidRobotExportContext { requirement?: string; testCases?: string; testData?: string; precondition?: string; component?: string; storyLinkages?: string; qcNotes?: string; } type Segment = 'audit' | 'elements' | 'export'; type RobotContextField = keyof AutoidRobotExportContext; declare class SdAutoidInspector implements OnDestroy { #private; enabled: _angular_core.InputSignalWithTransform; config: _angular_core.InputSignal; open: _angular_core.WritableSignal; segment: _angular_core.WritableSignal; filter: _angular_core.WritableSignal; elements: _angular_core.WritableSignal; audit: _angular_core.WritableSignal; copyOk: _angular_core.WritableSignal; e2eExporting: _angular_core.WritableSignal; e2eExportOk: _angular_core.WritableSignal; e2eExportError: _angular_core.WritableSignal; robotContextOpen: _angular_core.WritableSignal; robotExportContext: _angular_core.WritableSignal; highlightOn: _angular_core.WritableSignal; dismissed: _angular_core.WritableSignal; readonly e2eGeneratorHost: _angular_core.Signal; readonly hasRobotExportContext: _angular_core.Signal; filteredElements: _angular_core.Signal; /** * Elements not inside any sd-table — rendered in the main "Top-level" section. */ readonly topLevelElements: _angular_core.Signal; /** * Map of `sd-table` autoid → its inner autoid elements. Tables themselves * stay in `topLevelElements` (the table's own autoid is top-level). */ readonly tableGroups: _angular_core.Signal<{ scope: string; items: AutoidElement[]; }[]>; readonly dataOpened: _angular_core.Signal<"true" | "false">; readonly dataHighlightOn: _angular_core.Signal<"true" | "false">; readonly dataSegment: _angular_core.Signal; readonly dataElementCount: _angular_core.Signal; readonly dataMissingCount: _angular_core.Signal; readonly dataDuplicateCount: _angular_core.Signal; ngOnDestroy(): void; togglePanel: () => void; openPanel: () => void; closePanel: () => void; refresh: () => void; dismissFab: (event: Event) => void; toggleHighlight: () => void; setSegment: (seg: Segment) => void; copyJson: () => Promise; copyXpath: (autoid: string) => Promise; exportCsv: () => void; exportJson: () => void; exportMdPom: () => void; exportMdTable: () => void; openRobotExportContext: () => void; closeRobotExportContext: () => void; updateRobotExportContext: (field: RobotContextField, value: string) => void; confirmRobotExport: () => Promise; exportE2eTest: (target: AutoidE2eTarget, context?: AutoidRobotExportContext) => Promise; onEscape(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { SD_AUTOID_INSPECTOR_CONFIGURATION, SdAutoidInspector }; export type { SdAutoidInspectorConfiguration };