@worktile/theia 14.3.11 → 14.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/esm2020/components/action/prevent-default.mjs +4 -4
  2. package/esm2020/components/color-select/color-select.component.mjs +4 -4
  3. package/esm2020/components/column-resize/column-resize-notifier.mjs +4 -4
  4. package/esm2020/components/column-resize/column-resize.directive.mjs +4 -4
  5. package/esm2020/components/column-resize/column-resize.module.mjs +9 -9
  6. package/esm2020/components/column-resize/event-dispatcher.mjs +4 -4
  7. package/esm2020/components/column-resize/overlay-handle.component.mjs +4 -4
  8. package/esm2020/components/column-resize/resizing.store.mjs +4 -4
  9. package/esm2020/components/contextmenu/contextmenu.component.mjs +4 -4
  10. package/esm2020/components/conversion-hint/conversion-hint.component.mjs +4 -4
  11. package/esm2020/components/element/element.component.mjs +4 -4
  12. package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +4 -4
  13. package/esm2020/components/listbox/listbox.mjs +10 -10
  14. package/esm2020/components/plugin-menu/plugin-menu.component.mjs +4 -4
  15. package/esm2020/components/table-select/table-select.component.mjs +4 -4
  16. package/esm2020/components/template/template.component.mjs +4 -4
  17. package/esm2020/components/text/text.component.mjs +4 -4
  18. package/esm2020/components/toolbar/toolbar.component.mjs +4 -4
  19. package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +4 -4
  20. package/esm2020/components/toolbar-group/toolbar-group.component.mjs +4 -4
  21. package/esm2020/components/toolbar-item/toolbar-item.component.mjs +4 -4
  22. package/esm2020/core/toolbar-item/base-toolbar-item.mjs +7 -7
  23. package/esm2020/editor.component.mjs +4 -4
  24. package/esm2020/editor.module.mjs +5 -5
  25. package/esm2020/interfaces/view-base.mjs +4 -4
  26. package/esm2020/pipes.mjs +7 -7
  27. package/esm2020/plugins/blockquote/blockquote.component.mjs +4 -4
  28. package/esm2020/plugins/code/code.component.mjs +4 -4
  29. package/esm2020/plugins/color/toolbar-item.component.mjs +4 -4
  30. package/esm2020/plugins/hr/hr.component.mjs +4 -4
  31. package/esm2020/plugins/image/image.component.mjs +4 -4
  32. package/esm2020/plugins/inline-code/inline-code.component.mjs +4 -4
  33. package/esm2020/plugins/link/edit/link-edit.component.mjs +4 -4
  34. package/esm2020/plugins/link/hover/link-hover.component.mjs +4 -4
  35. package/esm2020/plugins/link/link.component.mjs +7 -7
  36. package/esm2020/plugins/list/components/bulleted-list.component.mjs +4 -4
  37. package/esm2020/plugins/list/components/list-item.component.mjs +4 -4
  38. package/esm2020/plugins/list/components/numbered-list.component.mjs +4 -4
  39. package/esm2020/plugins/mention/suggestion.component.mjs +4 -4
  40. package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +4 -4
  41. package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +4 -4
  42. package/esm2020/plugins/table/components/row/row.component.mjs +4 -4
  43. package/esm2020/plugins/table/components/table.component.mjs +53 -54
  44. package/esm2020/plugins/table/components/td/td.component.mjs +4 -4
  45. package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +4 -4
  46. package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +5 -5
  47. package/esm2020/plugins/table/table.editor.mjs +3 -2
  48. package/esm2020/plugins/table/table.pipe.mjs +7 -7
  49. package/esm2020/plugins/table/table.service.mjs +4 -4
  50. package/esm2020/plugins/table/table.store.mjs +50 -49
  51. package/esm2020/plugins/table/table.types.mjs +1 -1
  52. package/esm2020/plugins/table/toolbar-item.component.mjs +4 -4
  53. package/esm2020/plugins/table/transforms/insert-column.mjs +2 -5
  54. package/esm2020/plugins/table/utils/add-columns.mjs +3 -3
  55. package/esm2020/plugins/table/utils/get-select-cell-node.mjs +1 -1
  56. package/esm2020/plugins/table/utils/handle-cell.mjs +5 -0
  57. package/esm2020/plugins/table/utils/is-selection-in-table.mjs +3 -4
  58. package/esm2020/plugins/table/utils/merge-cell.mjs +3 -1
  59. package/esm2020/plugins/table/utils/remove-columns.mjs +2 -2
  60. package/esm2020/plugins/table/utils/set-menu-cell-invisibility.mjs +3 -3
  61. package/esm2020/plugins/table/utils/table-position.mjs +1 -1
  62. package/esm2020/plugins/todo-item/todo-item.component.mjs +4 -4
  63. package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +4 -4
  64. package/esm2020/services/color-select.service.mjs +4 -4
  65. package/esm2020/services/context.service.mjs +7 -6
  66. package/esm2020/services/table-contextmenu.service.mjs +4 -4
  67. package/esm2020/services/toolbar.service.mjs +4 -4
  68. package/fesm2015/worktile-theia.mjs +304 -298
  69. package/fesm2015/worktile-theia.mjs.map +1 -1
  70. package/fesm2020/worktile-theia.mjs +300 -296
  71. package/fesm2020/worktile-theia.mjs.map +1 -1
  72. package/package.json +1 -1
  73. package/plugins/table/components/table.component.d.ts +7 -4
  74. package/plugins/table/components/table.component.scss +2 -2
  75. package/plugins/table/table.editor.d.ts +1 -1
  76. package/plugins/table/table.store.d.ts +16 -11
  77. package/plugins/table/table.types.d.ts +1 -1
  78. package/plugins/table/utils/get-select-cell-node.d.ts +2 -2
  79. package/plugins/table/utils/handle-cell.d.ts +2 -0
  80. package/plugins/table/utils/is-selection-in-table.d.ts +2 -2
  81. package/plugins/table/utils/merge-cell.d.ts +2 -2
  82. package/plugins/table/utils/set-menu-cell-invisibility.d.ts +2 -2
  83. package/plugins/table/utils/table-position.d.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "14.3.11",
3
+ "version": "14.3.13",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -1,5 +1,5 @@
1
1
  import { OnInit, ElementRef, OnDestroy, ChangeDetectorRef, NgZone, AfterViewInit, Renderer2, QueryList } from '@angular/core';
2
- import { Subject, Subscription } from 'rxjs';
2
+ import { Subject } from 'rxjs';
3
3
  import { Editor } from 'slate';
4
4
  import { TheBaseElementComponent, ThePluginOption } from '../../../interfaces';
5
5
  import { TableCellElement, TableElement } from '../../../custom-types';
@@ -9,6 +9,7 @@ import { TableStore } from '../table.store';
9
9
  import { TableService } from '../table.service';
10
10
  import { ThePluginTableOption, TheTableColumn } from '../table.types';
11
11
  import { TableFreezeColumnPipe, TableFreezeRowPipe } from '../table.pipe';
12
+ import { TheContextService } from '../../../services/context.service';
12
13
  import * as i0 from "@angular/core";
13
14
  export declare class TheTableComponent extends TheBaseElementComponent<TableElement, Editor> implements OnInit, AfterViewInit, OnDestroy {
14
15
  eventDispatcher: TableCellEventDispatcher;
@@ -21,7 +22,9 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
21
22
  private freezeColumnPipe;
22
23
  freezeRowPipe: TableFreezeRowPipe;
23
24
  private renderer;
25
+ private contextService;
24
26
  headerRow: boolean;
27
+ isSelectedAllCell: boolean;
25
28
  destroy$: Subject<any>;
26
29
  rowControls: {
27
30
  height: number;
@@ -32,11 +35,11 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
32
35
  tablePluginOptions: ThePluginOption<ThePluginTableOption>;
33
36
  isStickyTop: boolean;
34
37
  scrollContainerTop: number;
35
- scrollContainerRef: Subscription;
38
+ tableWrapperMarginTop: number;
39
+ previousScrollContainer: string;
36
40
  get columns(): TheTableColumn[];
37
41
  get nativeElement(): HTMLElement;
38
42
  get tbodyNativeElement(): HTMLElement;
39
- get isSelectedAllCell(): boolean;
40
43
  tableWrapper: ElementRef<HTMLElement>;
41
44
  theTableElement: ElementRef;
42
45
  tbodyElement: ElementRef;
@@ -45,7 +48,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
45
48
  rowControlsButtonWrapper: QueryList<ElementRef<HTMLElement>>;
46
49
  handleMousedown(event: MouseEvent): void;
47
50
  onContextChange(): void;
48
- constructor(elementRef: ElementRef<HTMLElement>, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, tableStore: TableStore, cdr: ChangeDetectorRef, ngZone: NgZone, tableService: TableService, theTableContextMenuService: TheTableContextMenuService, freezeColumnPipe: TableFreezeColumnPipe, freezeRowPipe: TableFreezeRowPipe, renderer: Renderer2);
51
+ constructor(elementRef: ElementRef<HTMLElement>, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, tableStore: TableStore, cdr: ChangeDetectorRef, ngZone: NgZone, tableService: TableService, theTableContextMenuService: TheTableContextMenuService, freezeColumnPipe: TableFreezeColumnPipe, freezeRowPipe: TableFreezeRowPipe, renderer: Renderer2, contextService: TheContextService);
49
52
  ngOnInit(): void;
50
53
  getWrapperWidth(): number;
51
54
  /**
@@ -166,7 +166,7 @@ $top-cell-z-index: 13;
166
166
  grid-auto-flow: column;
167
167
  box-sizing: content-box;
168
168
  background: variables.$white;
169
- border-bottom: $controls-border;
169
+ // border-bottom: $controls-border;
170
170
  overflow-x: hidden;
171
171
  box-shadow: 0 6px 4px -4px rgba(0, 0, 0, 0.1);
172
172
 
@@ -377,7 +377,7 @@ $top-cell-z-index: 13;
377
377
  &.the-table-with-sticky-row {
378
378
  .slate-element-table-row.the-sticky-row {
379
379
  z-index: 115;
380
- padding-top: 36px;
380
+ padding-top: 0;
381
381
  }
382
382
  .the-table-row-controls-inner {
383
383
  .the-table-row-controls-button-wrap {
@@ -12,7 +12,7 @@ export declare const TableEditor: {
12
12
  removeColumn(editor: Editor, colIndex?: number, optionsParam?: TableOptions): void;
13
13
  clearCell(editor: Editor, nodeEntry?: NodeEntry<CustomElement>, optionsParam?: TableOptions): void;
14
14
  isActive(editor: Editor): boolean;
15
- getSelectedCells(editor: Editor): import("./table.types").SelectedCell[];
15
+ getSelectedCells(editor: Editor): import("./table.types").CellPosition[];
16
16
  isAlignActive(editor: TheEditor, alignment: Alignment): boolean;
17
17
  setAlign(editor: Editor, alignment: Alignment): boolean;
18
18
  setVerticalAlign(editor: TheEditor, alignment: VerticalAlignment): boolean;
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
2
2
  import { Editor } from 'slate';
3
3
  import { TablePosition } from './utils';
4
4
  import { ColorType } from '../../constants/color-select';
5
- import { SelectedCell, TheTableOptions } from './table.types';
5
+ import { CellPosition, TheTableOptions } from './table.types';
6
6
  import { TableElement } from '../../custom-types';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class TableStore {
@@ -27,27 +27,32 @@ export declare class TableStore {
27
27
  isRightClicking: boolean;
28
28
  maxCol: number;
29
29
  isModSelecting: boolean;
30
- get selectedCells(): SelectedCell[];
31
- get dangerousCells(): SelectedCell[];
30
+ get selectedCells(): CellPosition[];
31
+ get dangerousCells(): CellPosition[];
32
32
  constructor();
33
+ isSelectedAllCell: () => boolean;
33
34
  getTableEntry(): import("slate").NodeEntry<TableElement>;
34
35
  getTablePath(): import("slate").Path;
35
- setSelectedCells(cells: SelectedCell[], pos: TablePosition): void;
36
+ setSelectedCells(cells: CellPosition[], pos: TablePosition): void;
36
37
  initEditor(editor: Editor): void;
37
38
  /**
38
- * 多选模式下需要合并数据
39
- * @param cells SelectedCell[]
39
+ * 去重重复的单元格位置
40
40
  * @returns
41
41
  */
42
- buildModCells(cells: SelectedCell[]): SelectedCell[];
42
+ private uniqueCellPosition;
43
+ /**
44
+ * 获取一定范围内所有的单元格
45
+ * @returns
46
+ */
47
+ private getCellPositionsFromRange;
43
48
  selectRow(editor: Editor, index: number): void;
44
49
  selectColumn(editor: Editor, index: number): void;
45
50
  selectTable(editor: Editor): void;
46
- private getTableCellsAndPosition;
47
51
  selectCells(editor: Editor): void;
48
52
  getMinAndMaxCellIndex(maxRow: number, maxCol: number, minRow: number, minCol: number, table: TableElement): any;
49
53
  selectCell(cell: HTMLTableCellElement, editor: Editor): void;
50
- selectedCellsChange(): Observable<SelectedCell[]>;
54
+ getCellPositionsBeforeMerge({ row, col }: CellPosition): CellPosition[];
55
+ selectedCellsChange(): Observable<CellPosition[]>;
51
56
  cellsPositionChange(): Observable<object>;
52
57
  changeCells(): void;
53
58
  emitTableChange(): void;
@@ -58,10 +63,10 @@ export declare class TableStore {
58
63
  selectCellOngoing(cell: HTMLTableCellElement, editor: Editor): void;
59
64
  selectCellEnd(editor: Editor): void;
60
65
  focusCell(editor: Editor, path: number[]): void;
61
- dangerousCellsChange(): Observable<SelectedCell[]>;
66
+ dangerousCellsChange(): Observable<CellPosition[]>;
62
67
  setDangerousCells(): void;
63
68
  clearDangerousCells(): void;
64
- dangerousOrSelectedCellsChange(): Observable<SelectedCell[]>;
69
+ dangerousOrSelectedCellsChange(): Observable<CellPosition[]>;
65
70
  setDangerousRows(): void;
66
71
  setDangerousColumns(): void;
67
72
  setDangerousTable(): void;
@@ -52,7 +52,7 @@ export interface ThePluginTableOption {
52
52
  setFullscreen?: (editor: Editor, event: MouseEvent, element: Element) => void;
53
53
  fullscreenAction?: (editor: Editor) => Observable<boolean>;
54
54
  }
55
- export interface SelectedCell {
55
+ export interface CellPosition {
56
56
  row: number;
57
57
  col: number;
58
58
  }
@@ -1,6 +1,6 @@
1
1
  import { Editor } from 'slate';
2
- import { SelectedCell } from '../table.types';
3
- export declare function getSelectCellNode(editor: Editor, selectedCells: SelectedCell[]): {
2
+ import { CellPosition } from '../table.types';
3
+ export declare function getSelectCellNode(editor: Editor, selectedCells: CellPosition[]): {
4
4
  node: import("@worktile/theia").TableCellElement;
5
5
  row: number;
6
6
  col: number;
@@ -0,0 +1,2 @@
1
+ import { CellPosition } from '../table.types';
2
+ export declare function sortCell(cells: CellPosition[]): void;
@@ -1,5 +1,5 @@
1
1
  import { Editor } from 'slate';
2
- import { SelectedCell, TableOptions } from '../table.types';
2
+ import { CellPosition, TableOptions } from '../table.types';
3
3
  /**
4
4
  * Is the selection in a table
5
5
  */
@@ -10,4 +10,4 @@ export declare function isSelectionInTable(opts: TableOptions, editor: Editor):
10
10
  * @param cells
11
11
  * @returns boolean
12
12
  */
13
- export declare function isRectangularInTableCells(editor: Editor, cells: SelectedCell[]): boolean;
13
+ export declare function isRectangularInTableCells(editor: Editor, cells: CellPosition[]): boolean;
@@ -1,6 +1,6 @@
1
1
  import { Path, Editor } from 'slate';
2
2
  import { TableCellElement } from '../../../custom-types';
3
- import { SelectedCell } from '../table.types';
3
+ import { CellPosition } from '../table.types';
4
4
  export interface SelectedCellInfo {
5
5
  col: number;
6
6
  row: number;
@@ -17,5 +17,5 @@ export declare function calculateCellSpan(selectCellNodes: SelectedCellInfo[], l
17
17
  rowspan: number;
18
18
  colspan: number;
19
19
  };
20
- export declare function mergeCell(editor: Editor, selectedCells: SelectedCell[]): void;
20
+ export declare function mergeCell(editor: Editor, selectedCells: CellPosition[]): void;
21
21
  export declare function mergeCellContent(editor: Editor, leftTopCellPath: Path, cellPath: Path): void;
@@ -1,7 +1,7 @@
1
1
  import { Editor } from 'slate';
2
- import { MenuEntity, SelectedCell } from '../table.types';
2
+ import { MenuEntity, CellPosition } from '../table.types';
3
3
  export declare function setCellMenuVisibility(editor: Editor, menuList: MenuEntity[], tableInfo: {
4
- selectedCells: SelectedCell[];
4
+ selectedCells: CellPosition[];
5
5
  isFullscreen?: boolean;
6
6
  selectedRowsIndex?: number[];
7
7
  selectedColumnsIndex?: number[];
@@ -1,6 +1,6 @@
1
1
  import { Node, Path, NodeEntry, Element } from 'slate';
2
2
  import { TableCellElement, TableElement, TableRowElement } from '../../../custom-types';
3
- import { SelectedCell, TableOptions } from '../table.types';
3
+ import { CellPosition, TableOptions } from '../table.types';
4
4
  export declare class TablePosition {
5
5
  tableEntry?: NodeEntry<TableElement>;
6
6
  rowEntry?: NodeEntry<Element>;
@@ -93,5 +93,5 @@ export declare class TablePosition {
93
93
  /**
94
94
  * find cell data with col and row
95
95
  */
96
- findCellByPath(cell: SelectedCell): TableCellElement;
96
+ findCellByPath(cell: CellPosition): TableCellElement;
97
97
  }