import * as i0 from '@angular/core'; import { InjectionToken, Provider, AfterViewInit, ElementRef, OnDestroy } from '@angular/core'; import * as _ng_atomic_common_utils from '@ng-atomic/common/utils'; import * as _ng_atomic_common_pipes_data_accessor from '@ng-atomic/common/pipes/data-accessor'; import { LanguageService } from '@ng-atomic/common/services/language'; interface Cell { dataValue: any; expressionValue: any; } interface CellContext$1 { item: I; name: string; position: Position$1; } interface Selection { start: Position$1; end: Position$1 | null; } interface Position$1 { row: number; col: number; } declare class SpreadSheetDataService { readonly displayedColumns: i0.WritableSignal; readonly items: i0.WritableSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class GridService { protected readonly contextMap: Map>; protected readonly data: SpreadSheetDataService; readonly maxCol: i0.Signal; readonly maxRow: i0.Signal; setContext(context: CellContext$1): void; getContext(position: Position$1): CellContext$1 | null; protected buildKey(position: Position$1): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class NavigationService { private gridService; moveToNextCell({ row, col }: Position$1): Position$1; moveToPreviousCell({ row, col }: Position$1): Position$1; moveToNextRow({ row, col }: Position$1): Position$1; moveToPreviousRow({ row, col }: Position$1): Position$1; moveRight(position: Position$1): Position$1; moveLeft({ row, col }: Position$1): Position$1; moveUp({ row, col }: Position$1): Position$1; moveDown({ row, col }: Position$1): Position$1; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class SelectionService { protected readonly data: SpreadSheetDataService; private readonly selection; private readonly selectionStart; private readonly isMouseDown; private readonly grid; private readonly cellElMap; constructor(); isSelected(position: Position$1): boolean; isCursorPosition(position: Position$1): boolean; handleMouseDown(position: Position$1, event?: MouseEvent): void; handleMouseUp(): void; handleMouseEnter(position: Position$1): void; handleClick(position: Position$1, event?: MouseEvent): void; clearSelection(): void; setStartPosition(position: Position$1): void; getSelection(): Selection | null; getSelectionEndOrStart(): Position$1; updateSelectionEnd(position: Position$1): void; private startSelection; private updateSelection; clearSelectedRange(selection: { start: { row: number; col: number; }; end: { row: number; col: number; } | null; }): void; setCell(position: Position$1, el: HTMLTableCellElement): void; getCell(position: Position$1): HTMLTableCellElement | null; focus(position: Position$1): void; protected buildKey(position: Position$1): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ClipboardService { private selectionService; private clipboard; private snackBar; protected data: SpreadSheetDataService; readonly dataAccessor: _ng_atomic_common_pipes_data_accessor.DataAccessor; readonly expression: _ng_atomic_common_utils.ExpressionTransformer; readonly language: LanguageService; constructor(selectionService: SelectionService); private buildGridData; copy(): Promise; setData(items: any[], displayedColumns: string[]): void; protected copyText(text: string): void; paste(targetRow: number, targetCol: number): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class EditorService { protected readonly data: SpreadSheetDataService; private grid; private selection; private protection; private editingStateManager; readonly editinngCell: i0.WritableSignal<{ row: number; col: number; } | null>; protected readonly inputMap: Map; isEditing(position: Position$1): boolean; startEditing(position: Position$1): void; stopEditing(): void; focus(position: Position$1): void; getEditingCell(): Position$1 | null; setInput(input: HTMLInputElement, position: Position$1): void; getInput(position: Position$1): HTMLInputElement | null; protected buildKey(position: Position$1): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface CellContext { item: T; name: string; position: { row: number; col: number; }; } type CellProtector = (value: any, context: CellContext) => boolean; declare const COLUMN_PROTECTOR: InjectionToken; declare function provideCellProtector(useFactory: () => CellProtector): { provide: InjectionToken; useFactory: () => CellProtector; multi: boolean; }; declare class ProtectionService { readonly protectors: CellProtector[] | null; isEditable(value: any, context: CellContext): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface Range$1 { start: Position$1; end: Position$1; } declare class AutoFillService { private autofillMode; private sourcePosition; private targetRange; private previewElements; readonly isAutofillMode: i0.Signal; readonly getSourcePosition: i0.Signal; readonly getTargetRange: i0.Signal; startAutofill(position: Position$1): void; updateAutofillRange(endPosition: Position$1): void; cancelAutofill(): void; private updatePreview; private clearPreview; private getCellElement; private resetAutofill; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class SpreadSheetService { readonly config: { paste: boolean; }; readonly grid: GridService; readonly navigation: NavigationService; readonly selection: SelectionService; readonly clipboard: ClipboardService; readonly editor: EditorService; readonly protection: ProtectionService; readonly autofill: AutoFillService; handleKeyDown(event: KeyboardEvent): void; protected handleKeyDownOnEditing(event: KeyboardEvent): void; protected handleKeyDownOnSelecting(event: KeyboardEvent): void; protected move(_position: Position$1, dest: 'top' | 'bottom' | 'left' | 'right', mode: 'edit' | 'select'): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare function provideSpreadSheetService(): Provider[]; declare class SpreadSheetCell implements AfterViewInit { protected ss: SpreadSheetService; readonly el: ElementRef; readonly position: i0.InputSignal<{ row: number; col: number; }>; readonly editable: i0.InputSignal; readonly context: i0.InputSignal | null>; readonly isSelected: i0.Signal; readonly isEditing: i0.Signal; readonly frameEl: i0.WritableSignal; constructor(); onDbClick(): void; ngAfterViewInit(): void; protected buildOutlineFrame(): HTMLDivElement; protected createLabelElement(options: { label: string; color: string; }): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SpreadSheetCellInput implements AfterViewInit { protected ss: SpreadSheetService; readonly position: i0.InputSignal<{ row: number; col: number; }>; readonly el: ElementRef; readonly isSelected: i0.Signal; readonly isEditing: i0.Signal; ngAfterViewInit(): void; protected stopEditing(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } type Position = { row: number; col: number; }; type Range = { start: Position; end: Position; }; interface AutofillContext { sourceContext: any; targetContexts: Array<{ position: Position; context: any; }>; } declare class GridDataTableAutofill implements OnDestroy { private ss; private viewContainerRef; private renderer; private autofillStartPosition; private lastAutofillContexts; private cleanupFunctions; private handleComponent; private currentCell; readonly autofillComplete: i0.OutputEmitterRef<{ sourcePosition: Position; targetRange: Range; contexts: AutofillContext; }>; private currentPosition; constructor(); showHandle(cell: HTMLElement, position: Position): void; hideHandle(): void; onAutofillStart(position: Position): void; private setupScrollListener; private startAutofill; private onMouseMove; private onMouseUp; private completeAutofill; getLastAutofillContexts(): AutofillContext | null; private cleanup; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SpreadSheetCellAutofill { protected ss: SpreadSheetService; readonly el: ElementRef; readonly table: GridDataTableAutofill; readonly position: i0.InputSignal<{ row: number; col: number; }>; readonly enabled: i0.InputSignal; readonly shouldShow: i0.Signal; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export { AutoFillService, COLUMN_PROTECTOR, ClipboardService, EditorService, GridDataTableAutofill, GridService, NavigationService, ProtectionService, SelectionService, SpreadSheetCell, SpreadSheetCellAutofill, SpreadSheetCellInput, SpreadSheetDataService, SpreadSheetService, provideCellProtector, provideSpreadSheetService }; export type { AutofillContext, Cell, CellContext$1 as CellContext, CellProtector, Position$1 as Position, Range$1 as Range, Selection };