methods.types.ts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. import * as Handsontable from 'handsontable';
  2. const elem = document.createElement('div');
  3. const hot = new Handsontable(elem, {});
  4. hot.addHook('foo', [() => {}]);
  5. hot.addHook('foo', () => {});
  6. hot.addHookOnce('foo', [() => {}]);
  7. hot.addHookOnce('foo', () => {});
  8. hot.alter('insert_row', 123, 123, 'foo', true);
  9. hot.alter('insert_row');
  10. hot.clear();
  11. hot.colOffset();
  12. hot.colToProp(123);
  13. hot.countCols();
  14. hot.countEmptyCols(true);
  15. hot.countEmptyRows(true);
  16. hot.countRenderedCols();
  17. hot.countRenderedRows();
  18. hot.countRows();
  19. hot.countSourceRows();
  20. hot.countVisibleCols();
  21. hot.countVisibleRows();
  22. hot.deselectCell();
  23. hot.destroy();
  24. hot.destroyEditor(true);
  25. hot.emptySelectedCells();
  26. hot.getActiveEditor();
  27. hot.getCell(123, 123, true);
  28. hot.getCellEditor(123, 123);
  29. hot.getCellMeta(123, 123);
  30. hot.getCellRenderer(123, 123);
  31. hot.getCellValidator(123, 123);
  32. hot.getColHeader(123);
  33. hot.getColWidth(123);
  34. hot.getCoords(elem.querySelector('td'));
  35. hot.getCopyableData(123, 123);
  36. hot.getCopyableText(123, 123, 123, 123);
  37. hot.getData(123, 123, 123, 123);
  38. hot.getDataAtCell(123, 123);
  39. hot.getDataAtCol(123);
  40. hot.getDataAtProp(123);
  41. hot.getDataAtRow(123);
  42. hot.getDataAtRowProp(123, 'foo');
  43. hot.getDataType(123, 123, 123, 123);
  44. hot.getInstance();
  45. hot.getRowHeader(123);
  46. hot.getRowHeight(123);
  47. hot.getSchema();
  48. hot.getSelected();
  49. hot.getSelectedLast();
  50. hot.getSelectedRange();
  51. hot.getSelectedRangeLast();
  52. hot.getSettings();
  53. hot.getSourceData(123, 123, 123, 123);
  54. hot.getSourceDataAtCell(123, 123);
  55. hot.getSourceDataAtCol(123);
  56. hot.getSourceDataAtRow(123);
  57. hot.getTranslatedPhrase('foo', 123);
  58. hot.getValue();
  59. hot.hasColHeaders();
  60. hot.hasHook('foo');
  61. hot.hasRowHeaders();
  62. hot.isColumnModificationAllowed();
  63. hot.isEmptyCol(123);
  64. hot.isEmptyRow(123);
  65. hot.isListening();
  66. hot.listen();
  67. hot.loadData([]);
  68. hot.populateFromArray(123, 123, [], 123, 123, 'foo', 'foo', 'foo', []);
  69. hot.propToCol('foo');
  70. hot.propToCol(123);
  71. hot.removeCellMeta(123, 123, 'foo');
  72. hot.removeHook('foo', function() {});
  73. hot.render();
  74. hot.rowOffset();
  75. hot.runHooks('foo', 123, 'foo', true, {}, [], function() {});
  76. hot.selectAll();
  77. hot.selectCell(123, 123, 123, 123, true, true);
  78. hot.selectCellByProp(123, 'foo', 123, 'foo', true);
  79. hot.selectCells([[123, 'prop1', 123, 'prop2']], true, true);
  80. hot.selectCells([[123, 123, 123, 123]], true, true);
  81. hot.selectColumns(1, 4);
  82. hot.selectColumns(1);
  83. hot.selectRows(1, 4);
  84. hot.selectRows(1);
  85. hot.setCellMeta(123, 123, 'foo', 'foo');
  86. hot.setCellMetaObject(123, 123, {});
  87. hot.setDataAtCell(123, 123, 'foo', 'foo');
  88. hot.setDataAtCell(123, 123, {myProperty: 'foo'}, 'foo');
  89. hot.setDataAtCell([[123, 123, 'foo'], [123, 123, {myProperty: 'foo'}]], 'foo');
  90. hot.setDataAtRowProp(123, 'foo', 'foo', 'foo');
  91. hot.setDataAtRowProp([[123, 'foo', 'foo'], [123, 'foo', 'foo']], 'foo');
  92. hot.spliceCol(123, 123, 123, 'foo');
  93. hot.spliceRow(123, 123, 123, 'foo');
  94. hot.unlisten();
  95. hot.updateSettings({}, true);
  96. hot.validateCells(function() {});
  97. hot.validateColumns([1, 2, 3], function() {});
  98. hot.validateRows([1, 2, 3], function() {});
  99. const autoColumnSize: Handsontable.plugins.AutoColumnSize = hot.getPlugin('autoColumnSize');
  100. const autoRowSize: Handsontable.plugins.AutoRowSize = hot.getPlugin('autoRowSize');
  101. const autofill: Handsontable.plugins.Autofill = hot.getPlugin('autofill');
  102. const bindeRowsWithHeaders: Handsontable.plugins.BindRowsWithHeaders = hot.getPlugin('bindRowsWithHeaders');
  103. const collapsibleColumns: Handsontable.plugins.CollapsibleColumns = hot.getPlugin('collapsibleColumns');
  104. const columnSorting: Handsontable.plugins.ColumnSorting = hot.getPlugin('columnSorting');
  105. const columnSummary: Handsontable.plugins.ColumnSummary = hot.getPlugin('columnSummary');
  106. const comments: Handsontable.plugins.Comments = hot.getPlugin('comments');
  107. const contextMenu: Handsontable.plugins.ContextMenu = hot.getPlugin('contextMenu');
  108. const copyPaste: Handsontable.plugins.CopyPaste = hot.getPlugin('copyPaste');
  109. const dragToScroll: Handsontable.plugins.DragToScroll = hot.getPlugin('dragToScroll');
  110. const dropdownMenu: Handsontable.plugins.DropdownMenu = hot.getPlugin('dropdownMenu');
  111. const exportFile: Handsontable.plugins.ExportFile = hot.getPlugin('exportFile');
  112. const filters: Handsontable.plugins.Filters = hot.getPlugin('filters');
  113. const headerTooltips: Handsontable.plugins.HeaderTooltips = hot.getPlugin('headerTooltips');
  114. const hiddenColumns: Handsontable.plugins.HiddenColumns = hot.getPlugin('hiddenColumns');
  115. const hiddenRows: Handsontable.plugins.HiddenRows = hot.getPlugin('hiddenRows');
  116. const manualColumnFreeze: Handsontable.plugins.ManualColumnFreeze = hot.getPlugin('manualColumnFreeze');
  117. const manualColumnMove: Handsontable.plugins.ManualColumnMove = hot.getPlugin('manualColumnMove');
  118. const manualRowMove: Handsontable.plugins.ManualRowMove = hot.getPlugin('manualRowMove');
  119. const manualRowResize: Handsontable.plugins.ManualRowResize = hot.getPlugin('manualRowResize');
  120. const mergeCells: Handsontable.plugins.MergeCells = hot.getPlugin('mergeCells');
  121. const multiColumnSorting: Handsontable.plugins.MultiColumnSorting = hot.getPlugin('multiColumnSorting');
  122. const nestedHeaders: Handsontable.plugins.NestedHeaders = hot.getPlugin('nestedHeaders');
  123. const observeChanges: Handsontable.plugins.ObserveChanges = hot.getPlugin('observeChanges');
  124. const search: Handsontable.plugins.Search = hot.getPlugin('search');
  125. const trimeRows: Handsontable.plugins.TrimRows = hot.getPlugin('trimRows');
  126. const formulas: Handsontable.plugins.Formulas = hot.getPlugin('formulas');
  127. const ganttChart: Handsontable.plugins.GanttChart = hot.getPlugin('ganttChart');
  128. const nestedRows: Handsontable.plugins.NestedRows = hot.getPlugin('nestedRows');
  129. autoColumnSize.samplesGenerator.setSampleCount(5);