* Available methods * * @returns {Blocks}
()
| 18 | * @returns {Blocks} |
| 19 | */ |
| 20 | public get methods(): Blocks { |
| 21 | return { |
| 22 | clear: (): Promise<void> => this.clear(), |
| 23 | render: (data: OutputData): Promise<void> => this.render(data), |
| 24 | renderFromHTML: (data: string): Promise<void> => this.renderFromHTML(data), |
| 25 | delete: (index?: number): void => this.delete(index), |
| 26 | swap: (fromIndex: number, toIndex: number): void => this.swap(fromIndex, toIndex), |
| 27 | move: (toIndex: number, fromIndex?: number): void => this.move(toIndex, fromIndex), |
| 28 | getBlockByIndex: (index: number): BlockAPIInterface | undefined => this.getBlockByIndex(index), |
| 29 | getById: (id: string): BlockAPIInterface | null => this.getById(id), |
| 30 | getCurrentBlockIndex: (): number => this.getCurrentBlockIndex(), |
| 31 | getBlockIndex: (id: string): number => this.getBlockIndex(id), |
| 32 | getBlocksCount: (): number => this.getBlocksCount(), |
| 33 | getBlockByElement: (element: HTMLElement) => this.getBlockByElement(element), |
| 34 | stretchBlock: (index: number, status = true): void => this.stretchBlock(index, status), |
| 35 | insertNewBlock: (): void => this.insertNewBlock(), |
| 36 | insert: this.insert, |
| 37 | insertMany: this.insertMany, |
| 38 | update: this.update, |
| 39 | composeBlockData: this.composeBlockData, |
| 40 | convert: this.convert, |
| 41 | }; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Returns Blocks count |
nothing calls this directly
no test coverage detected