/** * @license * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file Class for event of move block to a module. * @author dev@varwin.com (Varwin Developers) */ import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js'; import { Workspace } from '../workspace.js'; import { BlockChangeJson } from './events_block_change.js'; import { Block } from '../block.js'; /** * Class for a move block to module event. * * @augments {Abstract} */ export declare class MoveBlockToModule extends AbstractEvent { isBlank: boolean; blockId: string; workspaceId: string; newModuleId?: string; previousModuleId?: string; /** * @param {Block} block The moved block. * Null for a blank event. * @param {string} newModuleId The new module id. * @param {string} previousModuleId The previous module id. */ constructor(block?: Block, newModuleId?: string, previousModuleId?: string); /** * Encode the event as JSON. * * @returns {!object} JSON representation. */ toJson(): AbstractEventJson; /** * Decode the JSON event. * * @param {!object} json JSON representation. * @param workspace * @param event */ static fromJson(json: BlockChangeJson, workspace: Workspace, event?: any): MoveBlockToModule; /** * Run a module move event. * * @param {boolean} forward True if run forward, false if run backward (undo). */ run(forward: boolean): void; } export interface MoveBlockToModuleJson extends AbstractEventJson { blockId: string; newModuleId: string; previousModuleId: string; } //# sourceMappingURL=events_move_block_to_module.d.ts.map