UNPKG

15.5 kBTypeScriptView Raw
1import Core from './core';
2import {
3 CellChange,
4 CellValue,
5 ChangeSource,
6 NumericFormatOptions,
7 RowObject,
8 SelectOptionsObject,
9 SourceRowData,
10} from './common';
11import {
12 GridSettings,
13 ColumnSettings,
14 CellMeta,
15 CellProperties,
16} from './settings';
17import * as RecordTranslation from './translations';
18import {
19 AutocompleteCellType,
20 CellType,
21 CheckboxCellType,
22 DateCellType,
23 DropdownCellType,
24 HandsontableCellType,
25 NumericCellType,
26 PasswordCellType,
27 SelectCellType,
28 TextCellType,
29 TimeCellType,
30 getCellType,
31 registerCellType,
32} from './cellTypes';
33import {
34 AutocompleteEditor,
35 BaseEditor,
36 CheckboxEditor,
37 DateEditor,
38 DropdownEditor,
39 HandsontableEditor,
40 NumericEditor,
41 PasswordEditor,
42 SelectEditor,
43 TextEditor,
44 TimeEditor,
45 EditorType,
46 getEditor,
47 registerEditor,
48} from './editors';
49import {
50 RendererType,
51 autocompleteRenderer,
52 dropdownRenderer,
53 dateRenderer,
54 baseRenderer,
55 checkboxRenderer,
56 htmlRenderer,
57 handsontableRenderer,
58 numericRenderer,
59 passwordRenderer,
60 selectRenderer,
61 textRenderer,
62 timeRenderer,
63 getRenderer,
64 registerRenderer,
65} from './renderers';
66import {
67 ValidatorType,
68 autocompleteValidator,
69 dropdownValidator,
70 dateValidator,
71 numericValidator,
72 timeValidator ,
73 getValidator,
74 registerValidator,
75} from './validators';
76import * as helper from './helpers';
77import * as dom from './helpers/dom';
78import CellCoords from './3rdparty/walkontable/src/cell/coords';
79import CellRange from './3rdparty/walkontable/src/cell/range';
80import EventManager from './eventManager';
81import { Hooks } from './pluginHooks';
82// plugins
83import {
84 AutoColumnSize as _AutoColumnSize,
85 Settings as AutoColumnSizeSettings,
86} from './plugins/autoColumnSize';
87import {
88 Autofill as _Autofill,
89 Settings as AutofillSettings,
90} from './plugins/autofill';
91import {
92 AutoRowSize as _AutoRowSize,
93 Settings as AutoRowSizeSettings,
94} from './plugins/autoRowSize';
95import {
96 BindRowsWithHeaders as _BindRowsWithHeaders,
97 Settings as BindRowsWithHeadersSettings,
98} from './plugins/bindRowsWithHeaders';
99import {
100 CollapsibleColumns as _CollapsibleColumns,
101 Settings as CollapsibleColumnsSettings,
102} from './plugins/collapsibleColumns';
103import {
104 ColumnSorting as _ColumnSorting,
105 Settings as ColumnSortingSettings,
106 SortOrderType as ColumnSortingSortOrderType,
107 Config as ColumnSortingConfig,
108} from './plugins/columnSorting';
109import {
110 ColumnSummary as _ColumnSummary,
111 Settings as ColumnSummarySettings,
112} from './plugins/columnSummary';
113import {
114 Comments as _Comments,
115 CommentObject,
116 Settings as CommentsSettings,
117 CommentConfig,
118} from './plugins/comments';
119import {
120 ContextMenu as _ContextMenu,
121 Settings as ContextMenuSettings,
122 Selection as ContextMenuSelection,
123 PredefinedMenuItemKey as ContextMenuPredefinedMenuItemKey,
124 MenuConfig as ContextMenuMenuConfig,
125 MenuItemConfig as ContextMenuMenuItemConfig,
126 SubmenuConfig as ContextMenuSubmenuConfig,
127 SubmenuItemConfig as ContextMenuSubmenuItemConfig,
128} from './plugins/contextMenu';
129import {
130 CopyPaste as _CopyPaste,
131 Settings as CopyPasteSettings,
132} from './plugins/copyPaste';
133import {
134 CustomBorders as _CustomBorders,
135 Settings as CustomBordersSettings,
136 BorderRange,
137 BorderOptions,
138} from './plugins/customBorders';
139import {
140 DragToScroll as _DragToScroll,
141 Settings as DragToScrollSettings,
142} from './plugins/dragToScroll';
143import {
144 DropdownMenu as _DropdownMenu,
145 Settings as DropdownMenuSettings,
146} from './plugins/dropdownMenu';
147import {
148 ExportFile as _ExportFile,
149 Settings as ExportFileSettings,
150} from './plugins/exportFile';
151import {
152 Filters as _Filters,
153 Settings as FiltersSettings,
154 ConditionId as FiltersConditionId,
155 ConditionName as FiltersConditionName,
156 OperationType as FiltersOperationType,
157} from './plugins/filters';
158import {
159 Formulas as _Formulas,
160 Settings as FormulasSettings,
161 HyperFormulaSettings,
162} from './plugins/formulas';
163import {
164 HiddenColumns as _HiddenColumns,
165 Settings as HiddenColumnsSettings,
166} from './plugins/hiddenColumns';
167import {
168 HiddenRows as _HiddenRows,
169 Settings as HiddenRowsSettings,
170} from './plugins/hiddenRows';
171import {
172 ManualColumnFreeze as _ManualColumnFreeze,
173 Settings as ManualColumnFreezeSettings,
174} from './plugins/manualColumnFreeze';
175import {
176 ManualColumnMove as _ManualColumnMove,
177 Settings as ManualColumnMoveSettings,
178} from './plugins/manualColumnMove';
179import {
180 ManualColumnResize as _ManualColumnResize,
181 Settings as ManualColumnResizeSettings,
182} from './plugins/manualColumnResize';
183import {
184 ManualRowMove as _ManualRowMove,
185 Settings as ManualRowMoveSettings,
186} from './plugins/manualRowMove';
187import {
188 ManualRowResize as _ManualRowResize,
189 Settings as ManualRowResizeSettings,
190} from './plugins/manualRowResize';
191import {
192 MergeCells as _MergeCells,
193 Settings as MergeCellsSettings,
194} from './plugins/mergeCells';
195import {
196 MultiColumnSorting as _MultiColumnSorting,
197 Settings as MultiColumnSortingSettings,
198 SortOrderType as MultiColumnSortingSortOrderType,
199 Config as MultiColumnSortingConfig,
200} from './plugins/multiColumnSorting';
201import {
202 MultipleSelectionHandles as _MultipleSelectionHandles,
203 Settings as MultipleSelectionHandlesSettings,
204} from './plugins/multipleSelectionHandles';
205import {
206 NestedHeaders as _NestedHeaders,
207 Settings as NestedHeadersSettings,
208} from './plugins/nestedHeaders';
209import {
210 NestedRows as _NestedRows,
211 Settings as NestedRowsSettings,
212} from './plugins/nestedRows';
213import {
214 PersistentState as _PersistentState,
215 Settings as PersistentStateSettings,
216} from './plugins/persistentState';
217import {
218 Search as _Search,
219 Settings as SearchSettings,
220 SearchCallback,
221 SearchQueryMethod,
222} from './plugins/search';
223import {
224 TouchScroll as _TouchScroll,
225 Settings as TouchScrollSettings,
226} from './plugins/touchScroll';
227import {
228 TrimRows as _TrimRows,
229 Settings as TrimRowsSettings,
230} from './plugins/trimRows';
231import {
232 UndoRedo as _UndoRedo,
233 Settings as UndoRedoSettings,
234} from './plugins/undoRedo';
235// i18n
236import {
237 LanguageDictionary,
238 registerLanguageDictionary,
239 getTranslatedPhrase,
240 getLanguagesDictionaries,
241 getLanguageDictionary,
242} from './i18n';
243
244declare const DefaultSettings: GridSettings;
245declare const hooks: Hooks;
246
247declare namespace Handsontable {
248 export {
249 // common
250 CellValue,
251 CellChange,
252 RowObject,
253 SelectOptionsObject,
254 SourceRowData,
255 ChangeSource,
256 // cell types
257 CellType,
258 // editors
259 EditorType,
260 // renderers
261 RendererType,
262 // validators
263 ValidatorType,
264 // settings
265 CellProperties,
266 CellMeta,
267 ColumnSettings,
268 GridSettings,
269 NumericFormatOptions,
270 // coords
271 CellCoords,
272 CellRange,
273
274 RecordTranslation,
275 };
276
277 export { helper };
278 export { dom };
279 export { hooks };
280 export { Core };
281 export { EventManager };
282 export { DefaultSettings };
283
284 export namespace languages {
285 export { LanguageDictionary as dictionaryKeys };
286 export { getLanguageDictionary };
287 export { getLanguagesDictionaries };
288 export { getTranslatedPhrase };
289 export { registerLanguageDictionary };
290 }
291
292 export namespace cellTypes {
293 export { AutocompleteCellType as autocomplete };
294 export { CheckboxCellType as checkbox };
295 export { DateCellType as date };
296 export { DropdownCellType as dropdown };
297 export { HandsontableCellType as handsontable };
298 export { NumericCellType as numeric };
299 export { PasswordCellType as password };
300 export { TextCellType as text };
301 export { SelectCellType as select };
302 export { TimeCellType as time };
303 export { registerCellType };
304 export { getCellType };
305 }
306
307 export namespace editors {
308 export { AutocompleteEditor };
309 export { BaseEditor };
310 export { CheckboxEditor };
311 export { DateEditor };
312 export { DropdownEditor };
313 export { HandsontableEditor };
314 export { NumericEditor };
315 export { PasswordEditor };
316 export { SelectEditor };
317 export { TextEditor };
318 export { TimeEditor };
319 export { registerEditor };
320 export { getEditor };
321 }
322
323 export namespace renderers {
324 export { autocompleteRenderer as AutocompleteRenderer };
325 export { dropdownRenderer as DropdownRenderer };
326 export { baseRenderer as cellDecorator };
327 export { baseRenderer as BaseRenderer };
328 export { checkboxRenderer as CheckboxRenderer };
329 export { htmlRenderer as HtmlRenderer };
330 export { handsontableRenderer as HandsontableRenderer };
331 export { numericRenderer as NumericRenderer };
332 export { passwordRenderer as PasswordRenderer };
333 export { textRenderer as TextRenderer };
334 export { dateRenderer as DateRenderer };
335 export { selectRenderer as SelectRenderer };
336 export { timeRenderer as TimeRenderer };
337 export { registerRenderer };
338 export { getRenderer };
339 }
340
341 export namespace validators {
342 export { autocompleteValidator as AutocompleteValidator };
343 export { dropdownValidator as DropdownValidator };
344 export { dateValidator as DateValidator };
345 export { numericValidator as NumericValidator };
346 export { timeValidator as TimeValidator };
347 export { registerValidator };
348 export { getValidator };
349 }
350
351 export namespace plugins {
352 export class AutoColumnSize extends _AutoColumnSize {}
353 export class Autofill extends _Autofill {}
354 export class AutoRowSize extends _AutoRowSize {}
355 export class BindRowsWithHeaders extends _BindRowsWithHeaders {}
356 export class CollapsibleColumns extends _CollapsibleColumns {}
357 export class ColumnSorting extends _ColumnSorting {}
358 export class ColumnSummary extends _ColumnSummary {}
359 export class Comments extends _Comments {}
360 export class ContextMenu extends _ContextMenu {}
361 export class CopyPaste extends _CopyPaste {}
362 export class CustomBorders extends _CustomBorders {}
363 export class DragToScroll extends _DragToScroll {}
364 export class DropdownMenu extends _DropdownMenu {}
365 export class ExportFile extends _ExportFile {}
366 export class Filters extends _Filters {}
367 export class Formulas extends _Formulas {}
368 export class HiddenColumns extends _HiddenColumns {}
369 export class HiddenRows extends _HiddenRows {}
370 export class ManualColumnFreeze extends _ManualColumnFreeze {}
371 export class ManualColumnMove extends _ManualColumnMove {}
372 export class ManualColumnResize extends _ManualColumnResize {}
373 export class ManualRowMove extends _ManualRowMove {}
374 export class ManualRowResize extends _ManualRowResize {}
375 export class MergeCells extends _MergeCells {}
376 export class MultiColumnSorting extends _MultiColumnSorting {}
377 export class MultipleSelectionHandles extends _MultipleSelectionHandles {}
378 export class NestedHeaders extends _NestedHeaders {}
379 export class NestedRows extends _NestedRows {}
380 export class PersistentState extends _PersistentState {}
381 export class Search extends _Search {}
382 export class TouchScroll extends _TouchScroll {}
383 export class TrimRows extends _TrimRows {}
384 export class UndoRedo extends _UndoRedo {}
385
386 export namespace AutoColumnSize {
387 export { AutoColumnSizeSettings as Settings };
388 }
389
390 export namespace Autofill {
391 export { AutofillSettings as Settings };
392 }
393
394 export namespace AutoRowSize {
395 export { AutoRowSizeSettings as Settings };
396 }
397
398 export namespace BindRowsWithHeaders {
399 export { BindRowsWithHeadersSettings as Settings };
400 }
401
402 export namespace CollapsibleColumns {
403 export { CollapsibleColumnsSettings as Settings };
404 }
405
406 export namespace ColumnSorting {
407 export { ColumnSortingSortOrderType as SortOrderType };
408 export { ColumnSortingConfig as Config };
409 export { ColumnSortingSettings as Settings };
410 }
411
412 export namespace ColumnSummary {
413 export { ColumnSummarySettings as Settings };
414 }
415
416 export namespace Comments {
417 export { CommentsSettings as Settings };
418 export { CommentObject };
419 export { CommentConfig };
420 }
421
422 export namespace ContextMenu {
423 export { ContextMenuSettings as Settings };
424 export { ContextMenuPredefinedMenuItemKey as PredefinedMenuItemKey };
425 export { ContextMenuSelection as Selection };
426 export { ContextMenuMenuConfig as MenuConfig };
427 export { ContextMenuMenuItemConfig as MenuItemConfig };
428 export { ContextMenuSubmenuConfig as SubmenuConfig };
429 export { ContextMenuSubmenuItemConfig as SubmenuItemConfig };
430 }
431
432 export namespace CopyPaste {
433 export { CopyPasteSettings as Settings };
434 }
435
436 export namespace CustomBorders {
437 export { CustomBordersSettings as Settings };
438 export { BorderOptions };
439 export { BorderRange };
440 }
441
442 export namespace DragToScroll {
443 export { DragToScrollSettings as Settings };
444 }
445
446 export namespace DropdownMenu {
447 export { DropdownMenuSettings as Settings };
448 }
449
450 export namespace ExportFile {
451 export { ExportFileSettings as Settings };
452 }
453
454 export namespace Filters {
455 export { FiltersSettings as Settings };
456 export { FiltersConditionId as ConditionId };
457 export { FiltersConditionName as ConditionName };
458 export { FiltersOperationType as OperationType };
459 }
460
461 export namespace Formulas {
462 export { FormulasSettings as Settings };
463 export { HyperFormulaSettings };
464 }
465
466 export namespace HiddenColumns {
467 export { HiddenColumnsSettings as Settings };
468 }
469
470 export namespace HiddenRows {
471 export { HiddenRowsSettings as Settings };
472 }
473
474 export namespace ManualColumnFreeze {
475 export { ManualColumnFreezeSettings as Settings };
476 }
477
478 export namespace ManualColumnMove {
479 export { ManualColumnMoveSettings as Settings };
480 }
481
482 export namespace ManualColumnResize {
483 export { ManualColumnResizeSettings as Settings };
484 }
485
486 export namespace ManualRowMove {
487 export { ManualRowMoveSettings as Settings };
488 }
489
490 export namespace ManualRowResize {
491 export { ManualRowResizeSettings as Settings };
492 }
493
494 export namespace MergeCells {
495 export { MergeCellsSettings as Settings };
496 }
497
498 export namespace MultiColumnSorting {
499 export { MultiColumnSortingSettings as Settings };
500 export { MultiColumnSortingSortOrderType as SortOrderType };
501 export { MultiColumnSortingConfig as Config };
502 }
503
504 export namespace MultipleSelectionHandles {
505 export { MultipleSelectionHandlesSettings as Settings };
506 }
507
508 export namespace NestedHeaders {
509 export { NestedHeadersSettings as Settings };
510 }
511
512 export namespace NestedRows {
513 export { NestedRowsSettings as Settings };
514 }
515
516 export namespace PersistentState {
517 export { PersistentStateSettings as Settings };
518 }
519
520 export namespace Search {
521 export { SearchSettings as Settings };
522 export { SearchCallback };
523 export { SearchQueryMethod };
524 }
525
526 export namespace TouchScroll {
527 export { TouchScrollSettings as Settings };
528 }
529
530 export namespace TrimRows {
531 export { TrimRowsSettings as Settings };
532 }
533
534 export namespace UndoRedo {
535 export { UndoRedoSettings as Settings };
536 }
537 }
538}
539
540declare class Handsontable extends Core {
541 static baseVersion: string;
542 static buildDate: string;
543 static packageName: 'handsontable';
544 static version: string;
545}
546
547export {
548 CellCoords,
549 CellRange,
550};
551export default Handsontable;