8
0
Просмотр исходного кода

Move utils.js to utils/utils.js.

Maciej Gołaszewski 5 лет назад
Родитель
Сommit
10dd479905
25 измененных файлов с 26 добавлено и 26 удалено
  1. 1 1
      packages/ckeditor5-table/src/commands/insertcolumncommand.js
  2. 1 1
      packages/ckeditor5-table/src/commands/insertrowcommand.js
  3. 1 1
      packages/ckeditor5-table/src/commands/mergecellcommand.js
  4. 1 1
      packages/ckeditor5-table/src/commands/mergecellscommand.js
  5. 1 1
      packages/ckeditor5-table/src/commands/removecolumncommand.js
  6. 1 1
      packages/ckeditor5-table/src/commands/removerowcommand.js
  7. 1 1
      packages/ckeditor5-table/src/commands/selectcolumncommand.js
  8. 1 1
      packages/ckeditor5-table/src/commands/selectrowcommand.js
  9. 1 1
      packages/ckeditor5-table/src/commands/setheadercolumncommand.js
  10. 1 1
      packages/ckeditor5-table/src/commands/setheaderrowcommand.js
  11. 1 1
      packages/ckeditor5-table/src/commands/splitcellcommand.js
  12. 1 1
      packages/ckeditor5-table/src/converters/downcast.js
  13. 1 1
      packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js
  14. 1 1
      packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js
  15. 1 1
      packages/ckeditor5-table/src/tableclipboard.js
  16. 1 1
      packages/ckeditor5-table/src/tablenavigation.js
  17. 1 1
      packages/ckeditor5-table/src/tableproperties/tablepropertiesui.js
  18. 1 1
      packages/ckeditor5-table/src/tableselection.js
  19. 1 1
      packages/ckeditor5-table/src/tabletoolbar.js
  20. 1 1
      packages/ckeditor5-table/src/ui/utils.js
  21. 2 2
      packages/ckeditor5-table/src/utils.js
  22. 1 1
      packages/ckeditor5-table/tests/manual/tablemocking.js
  23. 1 1
      packages/ckeditor5-table/tests/tablenavigation.js
  24. 1 1
      packages/ckeditor5-table/tests/ui/utils.js
  25. 1 1
      packages/ckeditor5-table/tests/utils.js

+ 1 - 1
packages/ckeditor5-table/src/commands/insertcolumncommand.js

@@ -9,7 +9,7 @@
 
 import Command from '@ckeditor/ckeditor5-core/src/command';
 import { findAncestor } from './utils';
-import { getColumnIndexes, getSelectionAffectedTableCells } from '../utils';
+import { getColumnIndexes, getSelectionAffectedTableCells } from '../utils/utils';
 
 /**
  * The insert column command.

+ 1 - 1
packages/ckeditor5-table/src/commands/insertrowcommand.js

@@ -9,7 +9,7 @@
 
 import Command from '@ckeditor/ckeditor5-core/src/command';
 import { findAncestor } from './utils';
-import { getRowIndexes, getSelectionAffectedTableCells } from '../utils';
+import { getRowIndexes, getSelectionAffectedTableCells } from '../utils/utils';
 
 /**
  * The insert row command.

+ 1 - 1
packages/ckeditor5-table/src/commands/mergecellcommand.js

@@ -10,7 +10,7 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 import TableWalker from '../tablewalker';
 import { isHeadingColumnCell, findAncestor } from './utils';
-import { getTableCellsContainingSelection } from '../utils';
+import { getTableCellsContainingSelection } from '../utils/utils';
 
 /**
  * The merge cell command.

+ 1 - 1
packages/ckeditor5-table/src/commands/mergecellscommand.js

@@ -10,7 +10,7 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 import TableUtils from '../tableutils';
 import { findAncestor, updateNumericAttribute } from './utils';
-import { isSelectionRectangular, getSelectedTableCells } from '../utils';
+import { isSelectionRectangular, getSelectedTableCells } from '../utils/utils';
 
 /**
  * The merge cells command.

+ 1 - 1
packages/ckeditor5-table/src/commands/removecolumncommand.js

@@ -10,7 +10,7 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 
 import TableWalker from '../tablewalker';
-import { getColumnIndexes, getSelectionAffectedTableCells } from '../utils';
+import { getColumnIndexes, getSelectionAffectedTableCells } from '../utils/utils';
 import { findAncestor } from './utils';
 
 /**

+ 1 - 1
packages/ckeditor5-table/src/commands/removerowcommand.js

@@ -10,7 +10,7 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 
 import { findAncestor } from './utils';
-import { getRowIndexes, getSelectionAffectedTableCells } from '../utils';
+import { getRowIndexes, getSelectionAffectedTableCells } from '../utils/utils';
 
 /**
  * The remove row command.

+ 1 - 1
packages/ckeditor5-table/src/commands/selectcolumncommand.js

@@ -11,7 +11,7 @@ import Command from '@ckeditor/ckeditor5-core/src/command';
 
 import TableWalker from '../tablewalker';
 import { findAncestor } from './utils';
-import { getSelectionAffectedTableCells } from '../utils';
+import { getSelectionAffectedTableCells } from '../utils/utils';
 
 /**
  * The select column command.

+ 1 - 1
packages/ckeditor5-table/src/commands/selectrowcommand.js

@@ -10,7 +10,7 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 
 import { findAncestor } from './utils';
-import { getRowIndexes, getSelectionAffectedTableCells } from '../utils';
+import { getRowIndexes, getSelectionAffectedTableCells } from '../utils/utils';
 
 /**
  * The select row command.

+ 1 - 1
packages/ckeditor5-table/src/commands/setheadercolumncommand.js

@@ -10,7 +10,7 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 
 import { findAncestor, isHeadingColumnCell, updateNumericAttribute } from './utils';
-import { getColumnIndexes, getSelectionAffectedTableCells, getHorizontallyOverlappingCells, splitVertically } from '../utils';
+import { getColumnIndexes, getSelectionAffectedTableCells, getHorizontallyOverlappingCells, splitVertically } from '../utils/utils';
 
 /**
  * The header column command.

+ 1 - 1
packages/ckeditor5-table/src/commands/setheaderrowcommand.js

@@ -10,7 +10,7 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 
 import { findAncestor, updateNumericAttribute } from './utils';
-import { getVerticallyOverlappingCells, getRowIndexes, getSelectionAffectedTableCells, splitHorizontally } from '../utils';
+import { getVerticallyOverlappingCells, getRowIndexes, getSelectionAffectedTableCells, splitHorizontally } from '../utils/utils';
 
 /**
  * The header row command.

+ 1 - 1
packages/ckeditor5-table/src/commands/splitcellcommand.js

@@ -8,7 +8,7 @@
  */
 
 import Command from '@ckeditor/ckeditor5-core/src/command';
-import { getSelectionAffectedTableCells } from '../utils';
+import { getSelectionAffectedTableCells } from '../utils/utils';
 
 /**
  * The split cell command.

+ 1 - 1
packages/ckeditor5-table/src/converters/downcast.js

@@ -9,7 +9,7 @@
 
 import TableWalker from './../tablewalker';
 import { toWidgetEditable } from '@ckeditor/ckeditor5-widget/src/utils';
-import { toTableWidget } from '../utils';
+import { toTableWidget } from '../utils/utils';
 
 /**
  * Model table element to view table element conversion helper.

+ 1 - 1
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js

@@ -8,7 +8,7 @@
  */
 
 import Command from '@ckeditor/ckeditor5-core/src/command';
-import { getSelectionAffectedTableCells } from '../../utils';
+import { getSelectionAffectedTableCells } from '../../utils/utils';
 
 /**
  * The table cell attribute command.

+ 1 - 1
packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js

@@ -9,7 +9,7 @@
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
-import { getTableWidgetAncestor } from '../utils';
+import { getTableWidgetAncestor } from '../utils/utils';
 import clickOutsideHandler from '@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler';
 import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon';
 import TableCellPropertiesView from './ui/tablecellpropertiesview';

+ 1 - 1
packages/ckeditor5-table/src/tableclipboard.js

@@ -20,7 +20,7 @@ import {
 	isSelectionRectangular,
 	splitHorizontally,
 	splitVertically
-} from './utils';
+} from './utils/utils';
 import { findAncestor } from './commands/utils';
 import { cropTableToDimensions, trimTableCellIfNeeded } from './tableselection/croptable';
 import TableUtils from './tableutils';

+ 1 - 1
packages/ckeditor5-table/src/tablenavigation.js

@@ -10,7 +10,7 @@
 import TableSelection from './tableselection';
 import TableWalker from './tablewalker';
 import { findAncestor } from './commands/utils';
-import { getSelectedTableCells, getTableCellsContainingSelection } from './utils';
+import { getSelectedTableCells, getTableCellsContainingSelection } from './utils/utils';
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect';

+ 1 - 1
packages/ckeditor5-table/src/tableproperties/tablepropertiesui.js

@@ -9,7 +9,7 @@
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
-import { getTableWidgetAncestor } from '../utils';
+import { getTableWidgetAncestor } from '../utils/utils';
 import clickOutsideHandler from '@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler';
 import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon';
 import TablePropertiesView from './ui/tablepropertiesview';

+ 1 - 1
packages/ckeditor5-table/src/tableselection.js

@@ -13,7 +13,7 @@ import first from '@ckeditor/ckeditor5-utils/src/first';
 import TableWalker from './tablewalker';
 import TableUtils from './tableutils';
 import MouseEventsObserver from './tableselection/mouseeventsobserver';
-import { getColumnIndexes, getRowIndexes, getSelectedTableCells, getTableCellsContainingSelection } from './utils';
+import { getColumnIndexes, getRowIndexes, getSelectedTableCells, getTableCellsContainingSelection } from './utils/utils';
 import { findAncestor } from './commands/utils';
 import { cropTableToDimensions } from './tableselection/croptable';
 

+ 1 - 1
packages/ckeditor5-table/src/tabletoolbar.js

@@ -8,7 +8,7 @@
  */
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
-import { getSelectedTableWidget, getTableWidgetAncestor } from './utils';
+import { getSelectedTableWidget, getTableWidgetAncestor } from './utils/utils';
 import WidgetToolbarRepository from '@ckeditor/ckeditor5-widget/src/widgettoolbarrepository';
 
 /**

+ 1 - 1
packages/ckeditor5-table/src/ui/utils.js

@@ -13,7 +13,7 @@ import Collection from '@ckeditor/ckeditor5-utils/src/collection';
 import Model from '@ckeditor/ckeditor5-ui/src/model';
 import ColorInputView from './colorinputview';
 import { isColor, isLength, isPercentage } from '@ckeditor/ckeditor5-engine/src/view/styles/utils';
-import { getTableWidgetAncestor } from '../utils';
+import { getTableWidgetAncestor } from '../utils/utils';
 import { findAncestor } from '../commands/utils';
 import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect';
 import { centeredBalloonPositionForLongWidgets } from '@ckeditor/ckeditor5-widget/src/utils';

+ 2 - 2
packages/ckeditor5-table/src/utils.js

@@ -8,8 +8,8 @@
  */
 
 import { isWidget, toWidget } from '@ckeditor/ckeditor5-widget/src/utils';
-import { createEmptyTableCell, findAncestor, updateNumericAttribute } from './commands/utils';
-import TableWalker from './tablewalker';
+import { createEmptyTableCell, findAncestor, updateNumericAttribute } from '../commands/utils';
+import TableWalker from '../tablewalker';
 
 /**
  * Converts a given {@link module:engine/view/element~Element} to a table widget:

+ 1 - 1
packages/ckeditor5-table/tests/manual/tablemocking.js

@@ -14,7 +14,7 @@ import { diffString } from 'json-diff';
 import { debounce } from 'lodash-es';
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import TableWalker from '../../src/tablewalker';
-import { getSelectionAffectedTableCells } from '../../src/utils';
+import { getSelectionAffectedTableCells } from '../../src/utils/utils';
 import { findAncestor } from '../../src/commands/utils';
 
 ClassicEditor

+ 1 - 1
packages/ckeditor5-table/tests/tablenavigation.js

@@ -8,7 +8,7 @@ import Table from '../src/table';
 import TableEditing from '../src/tableediting';
 import TableSelection from '../src/tableselection';
 import { modelTable } from './_utils/utils';
-import { getTableCellsContainingSelection } from '../src/utils';
+import { getTableCellsContainingSelection } from '../src/utils/utils';
 
 import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';

+ 1 - 1
packages/ckeditor5-table/tests/ui/utils.js

@@ -7,7 +7,7 @@ import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'
 import Table from '../../src/table';
 import TableCellProperties from '../../src/tablecellproperties';
 import { findAncestor } from '../../src/commands/utils';
-import { getTableCellsContainingSelection } from '../../src/utils';
+import { getTableCellsContainingSelection } from '../../src/utils/utils';
 import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import View from '@ckeditor/ckeditor5-ui/src/view';

+ 1 - 1
packages/ckeditor5-table/tests/utils.js

@@ -14,7 +14,7 @@ import {
 	getSelectedTableCells,
 	getTableCellsContainingSelection,
 	getSelectionAffectedTableCells, getVerticallyOverlappingCells, getHorizontallyOverlappingCells
-} from '../src/utils';
+} from '../src/utils/utils';
 
 describe( 'table utils', () => {
 	let editor, model, tableSelection, modelRoot;