@ones-editor/editor 2.1.1-beta.49 → 2.1.1-beta.50

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.
@@ -156,6 +156,7 @@ export interface CommandItem {
156
156
  hideGroupItem?: boolean;
157
157
  setCloseable?: (closeable: Closeable) => void;
158
158
  beforePopup?: (parent: unknown) => void;
159
+ switchable?: boolean;
159
160
  /**
160
161
  * defaults to true
161
162
  */
@@ -16,7 +16,7 @@ export default class OnesEditorHoveringBlock extends TypedEmitter<OnesEditorHove
16
16
  private editor;
17
17
  private hoveringBlock;
18
18
  hoveringElem: EventTarget | null;
19
- private hoveringTextChild;
19
+ hoveringTextChild: TextBlockContentChild | null;
20
20
  private filters;
21
21
  private finders;
22
22
  constructor(editor: OnesEditor);
@@ -5,8 +5,7 @@ export type Options = {
5
5
  export declare class ActiveElementObserver {
6
6
  private options;
7
7
  constructor(options: Options);
8
- handleFocusIn: (event: FocusEvent) => void;
9
- handleFocusOut: (event: FocusEvent) => void;
10
- isFormElement(element: Element): element is HTMLInputElement | HTMLTextAreaElement;
8
+ handleFocusIn: () => void;
9
+ handleFocusOut: () => void;
11
10
  destroy(): void;
12
11
  }
@@ -0,0 +1,12 @@
1
+ import { BlockElement, CommandItem, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
2
+ export default class MobileTableCommandProvider implements OnesEditorCommandProvider {
3
+ private editor;
4
+ id: string;
5
+ constructor(editor: OnesEditor);
6
+ getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
7
+ deleteRow: (tableBlock: BlockElement) => void;
8
+ deleteCol: (tableBlock: BlockElement) => void;
9
+ insertRowToBottom: (tableBlock: BlockElement) => void;
10
+ insertColToRight: (tableBlock: BlockElement) => void;
11
+ executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult | undefined) => boolean;
12
+ }
@@ -4,8 +4,9 @@ import './locale';
4
4
  import './table-style.scss';
5
5
  import TableShortcuts from './table-block/table-shortcuts';
6
6
  import { createEntireRowAndColumnRange, getAbstractTableSelectionRange } from './table-block/cell-menu/table-cell-dom';
7
+ import MobileTableCommandProvider from './commands/table-command-provider';
7
8
  export * from './types';
8
- export { TableBlock, TableBlockCommandProvider, TableShortcuts, includeBigTable };
9
+ export { MobileTableCommandProvider, TableBlock, TableBlockCommandProvider, TableShortcuts, includeBigTable };
9
10
  export { deleteColumns, deleteRows, setStripeStyle, setColTitle, setRowTitle, insertColumn, insertRow, };
10
11
  export { createEntireRowAndColumnRange, getAbstractTableSelectionRange };
11
12
  export type { CreateTableData } from './table-block/table-creator';