mirror of
https://github.com/google/blockly.git
synced 2026-05-09 05:30:11 +02:00
fix: tsc errors picked up from develop (#6224)
* fix: relative path for deprecation utils * fix: checking if properties exist in svg_math * fix: set all timeout PIDs to AnyDuringMigration * fix: make nullability errors explicity in block drag surface * fix: make null check in events_block_change explicit * fix: make getEventWorkspace_ internal so we can access it from CommentCreateDeleteHelper * fix: rename DIV -> containerDiv in tooltip * fix: ignore backwards compat check in category * fix: set block styles to AnyDuringMigration * fix: type typo in KeyboardShortcut * fix: constants name in row measurables * fix: typecast in mutator * fix: populateProcedures type of flattened array * fix: ignore errors related to workspace comment deserialization * chore: format files * fix: renaming imports missing file extensions * fix: remove check for sound.play * fix: temporarily remove bad requireType. All `export type` statements are stripped when tsc is run. This means that when we attempt to require BlockDefinition from the block files, we get an error because it does not exist. We decided to temporarily remove the require, because this will no longer be a problem when we conver the blocks to typescript, and everything gets compiled together. * fix: bad jsdoc in array * fix: silence missing property errors Closure was complaining about inexistant properties, but they actually do exist, they're just not being transpiled by tsc in a way that closure understands. I.E. if things are initialized in a function called by the constructor, rather than in a class field or in the custructor itself, closure would error. It would also error on enums, because they are transpiled to a weird IIFE. * fix: context menu action handler not knowing the type of this. this: TypeX information gets stripped when tsc is run, so closure could not know that this was not global. Fixed this by reorganizing to use the option object directly instead of passing it to onAction to be bound to this. * fix: readd getDeveloperVars checks (should not be part of migration) This was found because ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE was no longer being accessed. * fix: silence closure errors about overriding supertype props We propertly define the overrides in typescript, but these get removed from the compiled output, so closure doesn't know they exist. * fix: silence globalThis errors this: TypeX annotations get stripped from the compiled output, so closure can't know that we're accessing the correct things. However, typescript makes sure that this always has the correct properties, so silencing this should be fine. * fix: bad jsdoc name * chore: attempt compiling with blockly.js * fix: attempt moving the import statement above the namespace line * chore: add todo comments to block def files * chore: remove todo from context menu * chore: add comments abotu disabled errors
This commit is contained in:
+3
-1
@@ -22,8 +22,10 @@ const procedures = goog.require('Blockly.libraryBlocks.procedures');
|
||||
const texts = goog.require('Blockly.libraryBlocks.texts');
|
||||
const variables = goog.require('Blockly.libraryBlocks.variables');
|
||||
const variablesDynamic = goog.require('Blockly.libraryBlocks.variablesDynamic');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
|
||||
|
||||
exports.colour = colour;
|
||||
|
||||
+3
-1
@@ -11,8 +11,10 @@
|
||||
|
||||
goog.module('Blockly.libraryBlocks.colour');
|
||||
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.FieldColour');
|
||||
|
||||
+3
-1
@@ -17,8 +17,10 @@ const Xml = goog.require('Blockly.Xml');
|
||||
const {Align} = goog.require('Blockly.Input');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {ConnectionType} = goog.require('Blockly.ConnectionType');
|
||||
const {FieldDropdown} = goog.require('Blockly.FieldDropdown');
|
||||
const {Msg} = goog.require('Blockly.Msg');
|
||||
|
||||
+3
-1
@@ -19,8 +19,10 @@ const Extensions = goog.require('Blockly.Extensions');
|
||||
const xmlUtils = goog.require('Blockly.utils.xml');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {Msg} = goog.require('Blockly.Msg');
|
||||
const {Mutator} = goog.require('Blockly.Mutator');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
+3
-1
@@ -21,8 +21,10 @@ const Variables = goog.require('Blockly.Variables');
|
||||
const xmlUtils = goog.require('Blockly.utils.xml');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {Msg} = goog.require('Blockly.Msg');
|
||||
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
|
||||
/** @suppress {extraRequire} */
|
||||
|
||||
+3
-1
@@ -19,8 +19,10 @@ const FieldDropdown = goog.require('Blockly.FieldDropdown');
|
||||
const xmlUtils = goog.require('Blockly.utils.xml');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.FieldLabel');
|
||||
|
||||
@@ -23,8 +23,10 @@ const xmlUtils = goog.require('Blockly.utils.xml');
|
||||
const {Align} = goog.require('Blockly.Input');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {config} = goog.require('Blockly.config');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {FieldCheckbox} = goog.require('Blockly.FieldCheckbox');
|
||||
|
||||
+3
-1
@@ -19,8 +19,10 @@ const xmlUtils = goog.require('Blockly.utils.xml');
|
||||
const {Align} = goog.require('Blockly.Input');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {ConnectionType} = goog.require('Blockly.ConnectionType');
|
||||
const {FieldDropdown} = goog.require('Blockly.FieldDropdown');
|
||||
const {FieldImage} = goog.require('Blockly.FieldImage');
|
||||
|
||||
+3
-1
@@ -18,8 +18,10 @@ const Variables = goog.require('Blockly.Variables');
|
||||
const xmlUtils = goog.require('Blockly.utils.xml');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {Msg} = goog.require('Blockly.Msg');
|
||||
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
|
||||
/** @suppress {extraRequire} */
|
||||
|
||||
@@ -20,8 +20,10 @@ const Variables = goog.require('Blockly.Variables');
|
||||
const xml = goog.require('Blockly.utils.xml');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
// TODO (6248): Properly import the BlockDefinition type.
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {BlockDefinition} = goog.requireType('Blockly.blocks');
|
||||
const BlockDefinition = Object;
|
||||
const {Msg} = goog.require('Blockly.Msg');
|
||||
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
|
||||
/** @suppress {extraRequire} */
|
||||
|
||||
+3
-3
@@ -16,11 +16,11 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Block');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_create';
|
||||
import './events/events_block_create.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_delete';
|
||||
import './events/events_block_delete.js';
|
||||
|
||||
import {Blocks} from './blocks.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
@@ -30,7 +30,7 @@ interface CloneRect {
|
||||
} // eslint-disable-line no-unused-vars
|
||||
|
||||
/** PID of disconnect UI animation. There can only be one at a time. */
|
||||
let disconnectPid = 0;
|
||||
let disconnectPid: AnyDuringMigration = 0;
|
||||
|
||||
/** SVG group of wobbling block. There can only be one at a time. */
|
||||
// AnyDuringMigration because: Type 'null' is not assignable to type 'Element'.
|
||||
|
||||
@@ -122,7 +122,7 @@ export class BlockDragSurfaceSvg {
|
||||
const roundY = Math.round(y);
|
||||
this.childSurfaceXY_.x = roundX;
|
||||
this.childSurfaceXY_.y = roundY;
|
||||
this.dragGroup_.setAttribute(
|
||||
this.dragGroup_!.setAttribute(
|
||||
'transform',
|
||||
'translate(' + roundX + ',' + roundY + ') scale(' + scale + ')');
|
||||
}
|
||||
@@ -132,12 +132,12 @@ export class BlockDragSurfaceSvg {
|
||||
* @private
|
||||
*/
|
||||
translateSurfaceInternal_() {
|
||||
let x = this.surfaceXY_.x;
|
||||
let y = this.surfaceXY_.y;
|
||||
let x = this.surfaceXY_!.x;
|
||||
let y = this.surfaceXY_!.y;
|
||||
// Make sure the svg exists on a pixel boundary so that it is not fuzzy.
|
||||
x = Math.round(x);
|
||||
y = Math.round(y);
|
||||
this.SVG_.style.display = 'block';
|
||||
this.SVG_!.style.display = 'block';
|
||||
|
||||
// AnyDuringMigration because: Argument of type 'SVGElement | null' is not
|
||||
// assignable to parameter of type 'Element'.
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.BlockDragger');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_drag';
|
||||
import './events/events_block_drag.js';
|
||||
|
||||
import * as blockAnimation from './block_animations.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
+5
-4
@@ -17,11 +17,11 @@ goog.declareModuleId('Blockly.BlockSvg');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './theme';
|
||||
import './theme.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_selected';
|
||||
import './events/events_selected.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './touch';
|
||||
import './touch.js';
|
||||
|
||||
import {Block} from './block.js';
|
||||
import * as blockAnimations from './block_animations.js';
|
||||
@@ -131,7 +131,8 @@ export class BlockSvg extends Block implements IASTNodeLocationSvg,
|
||||
*/
|
||||
// AnyDuringMigration because: Type 'null' is not assignable to type '{ [key:
|
||||
// string]: number; }'.
|
||||
private warningTextDb_: {[key: string]: number} = null as AnyDuringMigration;
|
||||
private warningTextDb_: {[key: string]: AnyDuringMigration} =
|
||||
null as AnyDuringMigration;
|
||||
|
||||
/** Block's mutator icon (if any). */
|
||||
mutator: Mutator|null = null;
|
||||
|
||||
+890
@@ -0,0 +1,890 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2011 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview The top level namespace used to access the Blockly library.
|
||||
* @suppress {moduleImport}
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The top level namespace used to access the Blockly library.
|
||||
* @namespace Blockly
|
||||
*/
|
||||
goog.module('Blockly');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
const ContextMenu = goog.require('Blockly.ContextMenu');
|
||||
const ContextMenuItems = goog.require('Blockly.ContextMenuItems');
|
||||
const Css = goog.require('Blockly.Css');
|
||||
const Events = goog.require('Blockly.Events');
|
||||
const Extensions = goog.require('Blockly.Extensions');
|
||||
const Procedures = goog.require('Blockly.Procedures');
|
||||
const ShortcutItems = goog.require('Blockly.ShortcutItems');
|
||||
const Themes = goog.require('Blockly.Themes');
|
||||
const Tooltip = goog.require('Blockly.Tooltip');
|
||||
const Touch = goog.require('Blockly.Touch');
|
||||
const Variables = goog.require('Blockly.Variables');
|
||||
const VariablesDynamic = goog.require('Blockly.VariablesDynamic');
|
||||
const WidgetDiv = goog.require('Blockly.WidgetDiv');
|
||||
const Xml = goog.require('Blockly.Xml');
|
||||
const blockAnimations = goog.require('Blockly.blockAnimations');
|
||||
const blockRendering = goog.require('Blockly.blockRendering');
|
||||
const browserEvents = goog.require('Blockly.browserEvents');
|
||||
const bumpObjects = goog.require('Blockly.bumpObjects');
|
||||
const clipboard = goog.require('Blockly.clipboard');
|
||||
const colour = goog.require('Blockly.utils.colour');
|
||||
const common = goog.require('Blockly.common');
|
||||
const constants = goog.require('Blockly.constants');
|
||||
const deprecation = goog.require('Blockly.utils.deprecation');
|
||||
const dialog = goog.require('Blockly.dialog');
|
||||
const dropDownDiv = goog.require('Blockly.dropDownDiv');
|
||||
const fieldRegistry = goog.require('Blockly.fieldRegistry');
|
||||
const geras = goog.require('Blockly.geras');
|
||||
const internalConstants = goog.require('Blockly.internalConstants');
|
||||
const minimalist = goog.require('Blockly.minimalist');
|
||||
const registry = goog.require('Blockly.registry');
|
||||
const serializationBlocks = goog.require('Blockly.serialization.blocks');
|
||||
const serializationExceptions = goog.require('Blockly.serialization.exceptions');
|
||||
const serializationPriorities = goog.require('Blockly.serialization.priorities');
|
||||
const serializationRegistry = goog.require('Blockly.serialization.registry');
|
||||
const serializationVariables = goog.require('Blockly.serialization.variables');
|
||||
const serializationWorkspaces = goog.require('Blockly.serialization.workspaces');
|
||||
const svgMath = goog.require('Blockly.utils.svgMath');
|
||||
const thrasos = goog.require('Blockly.thrasos');
|
||||
const toolbox = goog.require('Blockly.utils.toolbox');
|
||||
const uiPosition = goog.require('Blockly.uiPosition');
|
||||
const utils = goog.require('Blockly.utils');
|
||||
const zelos = goog.require('Blockly.zelos');
|
||||
const {Align, Input} = goog.require('Blockly.Input');
|
||||
const {ASTNode} = goog.require('Blockly.ASTNode');
|
||||
const {BasicCursor} = goog.require('Blockly.BasicCursor');
|
||||
const {BlockDragSurfaceSvg} = goog.require('Blockly.BlockDragSurfaceSvg');
|
||||
const {BlockDragger} = goog.require('Blockly.BlockDragger');
|
||||
const {BlockSvg} = goog.require('Blockly.BlockSvg');
|
||||
const {BlocklyOptions} = goog.require('Blockly.BlocklyOptions');
|
||||
const {Blocks} = goog.require('Blockly.blocks');
|
||||
const {Block} = goog.require('Blockly.Block');
|
||||
const {BubbleDragger} = goog.require('Blockly.BubbleDragger');
|
||||
const {Bubble} = goog.require('Blockly.Bubble');
|
||||
const {CollapsibleToolboxCategory} = goog.require('Blockly.CollapsibleToolboxCategory');
|
||||
const {Comment} = goog.require('Blockly.Comment');
|
||||
const {ComponentManager} = goog.require('Blockly.ComponentManager');
|
||||
const {config} = goog.require('Blockly.config');
|
||||
const {ConnectionChecker} = goog.require('Blockly.ConnectionChecker');
|
||||
const {ConnectionDB} = goog.require('Blockly.ConnectionDB');
|
||||
const {ConnectionType} = goog.require('Blockly.ConnectionType');
|
||||
const {Connection} = goog.require('Blockly.Connection');
|
||||
const {ContextMenuRegistry} = goog.require('Blockly.ContextMenuRegistry');
|
||||
const {Cursor} = goog.require('Blockly.Cursor');
|
||||
const {DeleteArea} = goog.require('Blockly.DeleteArea');
|
||||
const {DragTarget} = goog.require('Blockly.DragTarget');
|
||||
const {FieldAngle} = goog.require('Blockly.FieldAngle');
|
||||
const {FieldCheckbox} = goog.require('Blockly.FieldCheckbox');
|
||||
const {FieldColour} = goog.require('Blockly.FieldColour');
|
||||
const {FieldDropdown} = goog.require('Blockly.FieldDropdown');
|
||||
const {FieldImage} = goog.require('Blockly.FieldImage');
|
||||
const {FieldLabelSerializable} = goog.require('Blockly.FieldLabelSerializable');
|
||||
const {FieldLabel} = goog.require('Blockly.FieldLabel');
|
||||
const {FieldMultilineInput} = goog.require('Blockly.FieldMultilineInput');
|
||||
const {FieldNumber} = goog.require('Blockly.FieldNumber');
|
||||
const {FieldTextInput} = goog.require('Blockly.FieldTextInput');
|
||||
const {FieldVariable} = goog.require('Blockly.FieldVariable');
|
||||
const {Field} = goog.require('Blockly.Field');
|
||||
const {FlyoutButton} = goog.require('Blockly.FlyoutButton');
|
||||
const {FlyoutMetricsManager} = goog.require('Blockly.FlyoutMetricsManager');
|
||||
const {Flyout} = goog.require('Blockly.Flyout');
|
||||
const {Generator} = goog.require('Blockly.Generator');
|
||||
const {Gesture} = goog.require('Blockly.Gesture');
|
||||
const {Grid} = goog.require('Blockly.Grid');
|
||||
const {HorizontalFlyout} = goog.require('Blockly.HorizontalFlyout');
|
||||
const {IASTNodeLocationSvg} = goog.require('Blockly.IASTNodeLocationSvg');
|
||||
const {IASTNodeLocationWithBlock} = goog.require('Blockly.IASTNodeLocationWithBlock');
|
||||
const {IASTNodeLocation} = goog.require('Blockly.IASTNodeLocation');
|
||||
const {IAutoHideable} = goog.require('Blockly.IAutoHideable');
|
||||
const {IBlockDragger} = goog.require('Blockly.IBlockDragger');
|
||||
const {IBoundedElement} = goog.require('Blockly.IBoundedElement');
|
||||
const {IBubble} = goog.require('Blockly.IBubble');
|
||||
const {ICollapsibleToolboxItem} = goog.require('Blockly.ICollapsibleToolboxItem');
|
||||
const {IComponent} = goog.require('Blockly.IComponent');
|
||||
const {IConnectionChecker} = goog.require('Blockly.IConnectionChecker');
|
||||
const {IContextMenu} = goog.require('Blockly.IContextMenu');
|
||||
const {ICopyable} = goog.require('Blockly.ICopyable');
|
||||
const {IDeletable} = goog.require('Blockly.IDeletable');
|
||||
const {IDeleteArea} = goog.require('Blockly.IDeleteArea');
|
||||
const {IDragTarget} = goog.require('Blockly.IDragTarget');
|
||||
const {IDraggable} = goog.require('Blockly.IDraggable');
|
||||
const {IFlyout} = goog.require('Blockly.IFlyout');
|
||||
const {IKeyboardAccessible} = goog.require('Blockly.IKeyboardAccessible');
|
||||
const {IMetricsManager} = goog.require('Blockly.IMetricsManager');
|
||||
const {IMovable} = goog.require('Blockly.IMovable');
|
||||
const {IPositionable} = goog.require('Blockly.IPositionable');
|
||||
const {IRegistrableField} = goog.require('Blockly.IRegistrableField');
|
||||
const {IRegistrable} = goog.require('Blockly.IRegistrable');
|
||||
const {ISelectableToolboxItem} = goog.require('Blockly.ISelectableToolboxItem');
|
||||
const {ISelectable} = goog.require('Blockly.ISelectable');
|
||||
const {ISerializer} = goog.require('Blockly.serialization.ISerializer');
|
||||
const {IStyleable} = goog.require('Blockly.IStyleable');
|
||||
const {IToolboxItem} = goog.require('Blockly.IToolboxItem');
|
||||
const {IToolbox} = goog.require('Blockly.IToolbox');
|
||||
const {Icon} = goog.require('Blockly.Icon');
|
||||
const {InsertionMarkerManager} = goog.require('Blockly.InsertionMarkerManager');
|
||||
const {Marker} = goog.require('Blockly.Marker');
|
||||
const {MarkerManager} = goog.require('Blockly.MarkerManager');
|
||||
const {MenuItem} = goog.require('Blockly.MenuItem');
|
||||
const {Menu} = goog.require('Blockly.Menu');
|
||||
const {MetricsManager} = goog.require('Blockly.MetricsManager');
|
||||
const {Mutator} = goog.require('Blockly.Mutator');
|
||||
const {Msg} = goog.require('Blockly.Msg');
|
||||
const {Names} = goog.require('Blockly.Names');
|
||||
const {Options} = goog.require('Blockly.Options');
|
||||
const {RenderedConnection} = goog.require('Blockly.RenderedConnection');
|
||||
const {ScrollbarPair} = goog.require('Blockly.ScrollbarPair');
|
||||
const {Scrollbar} = goog.require('Blockly.Scrollbar');
|
||||
const {ShortcutRegistry} = goog.require('Blockly.ShortcutRegistry');
|
||||
const {TabNavigateCursor} = goog.require('Blockly.TabNavigateCursor');
|
||||
const {ThemeManager} = goog.require('Blockly.ThemeManager');
|
||||
const {Theme} = goog.require('Blockly.Theme');
|
||||
const {ToolboxCategory} = goog.require('Blockly.ToolboxCategory');
|
||||
const {ToolboxItem} = goog.require('Blockly.ToolboxItem');
|
||||
const {ToolboxSeparator} = goog.require('Blockly.ToolboxSeparator');
|
||||
const {Toolbox} = goog.require('Blockly.Toolbox');
|
||||
const {TouchGesture} = goog.require('Blockly.TouchGesture');
|
||||
const {Trashcan} = goog.require('Blockly.Trashcan');
|
||||
const {VariableMap} = goog.require('Blockly.VariableMap');
|
||||
const {VariableModel} = goog.require('Blockly.VariableModel');
|
||||
const {VerticalFlyout} = goog.require('Blockly.VerticalFlyout');
|
||||
const {Warning} = goog.require('Blockly.Warning');
|
||||
const {WorkspaceAudio} = goog.require('Blockly.WorkspaceAudio');
|
||||
const {WorkspaceCommentSvg} = goog.require('Blockly.WorkspaceCommentSvg');
|
||||
const {WorkspaceComment} = goog.require('Blockly.WorkspaceComment');
|
||||
const {WorkspaceDragSurfaceSvg} = goog.require('Blockly.WorkspaceDragSurfaceSvg');
|
||||
const {WorkspaceDragger} = goog.require('Blockly.WorkspaceDragger');
|
||||
const {WorkspaceSvg, resizeSvgContents} = goog.require('Blockly.WorkspaceSvg');
|
||||
const {Workspace} = goog.require('Blockly.Workspace');
|
||||
const {ZoomControls} = goog.require('Blockly.ZoomControls');
|
||||
const {inject} = goog.require('Blockly.inject');
|
||||
const {inputTypes} = goog.require('Blockly.inputTypes');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.Events.BlockCreate');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.Events.FinishedLoading');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.Events.Ui');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.Events.UiBase');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.Events.VarCreate');
|
||||
|
||||
|
||||
/**
|
||||
* Blockly core version.
|
||||
* This constant is overridden by the build script (npm run build) to the value
|
||||
* of the version in package.json. This is done by the Closure Compiler in the
|
||||
* buildCompressed gulp task.
|
||||
* For local builds, you can pass --define='Blockly.VERSION=X.Y.Z' to the
|
||||
* compiler to override this constant.
|
||||
* @define {string}
|
||||
* @alias Blockly.VERSION
|
||||
*/
|
||||
exports.VERSION = 'uncompiled';
|
||||
|
||||
/*
|
||||
* Top-level functions and properties on the Blockly namespace.
|
||||
* These are used only in external code. Do not reference these
|
||||
* from internal code as importing from this file can cause circular
|
||||
* dependencies. Do not add new functions here. There is probably a better
|
||||
* namespace to put new functions on.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Aliases for input alignments used in block defintions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see Blockly.Input.Align.LEFT
|
||||
* @alias Blockly.ALIGN_LEFT
|
||||
*/
|
||||
exports.ALIGN_LEFT = Align.LEFT;
|
||||
|
||||
/**
|
||||
* @see Blockly.Input.Align.CENTRE
|
||||
* @alias Blockly.ALIGN_CENTRE
|
||||
*/
|
||||
exports.ALIGN_CENTRE = Align.CENTRE;
|
||||
|
||||
/**
|
||||
* @see Blockly.Input.Align.RIGHT
|
||||
* @alias Blockly.ALIGN_RIGHT
|
||||
*/
|
||||
exports.ALIGN_RIGHT = Align.RIGHT;
|
||||
|
||||
/*
|
||||
* Aliases for constants used for connection and input types.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see ConnectionType.INPUT_VALUE
|
||||
* @alias Blockly.INPUT_VALUE
|
||||
*/
|
||||
exports.INPUT_VALUE = ConnectionType.INPUT_VALUE;
|
||||
|
||||
/**
|
||||
* @see ConnectionType.OUTPUT_VALUE
|
||||
* @alias Blockly.OUTPUT_VALUE
|
||||
*/
|
||||
exports.OUTPUT_VALUE = ConnectionType.OUTPUT_VALUE;
|
||||
|
||||
/**
|
||||
* @see ConnectionType.NEXT_STATEMENT
|
||||
* @alias Blockly.NEXT_STATEMENT
|
||||
*/
|
||||
exports.NEXT_STATEMENT = ConnectionType.NEXT_STATEMENT;
|
||||
|
||||
/**
|
||||
* @see ConnectionType.PREVIOUS_STATEMENT
|
||||
* @alias Blockly.PREVIOUS_STATEMENT
|
||||
*/
|
||||
exports.PREVIOUS_STATEMENT = ConnectionType.PREVIOUS_STATEMENT;
|
||||
|
||||
/**
|
||||
* @see inputTypes.DUMMY_INPUT
|
||||
* @alias Blockly.DUMMY_INPUT
|
||||
*/
|
||||
exports.DUMMY_INPUT = inputTypes.DUMMY;
|
||||
|
||||
/**
|
||||
* Aliases for toolbox positions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see toolbox.Position.TOP
|
||||
* @alias Blockly.TOOLBOX_AT_TOP
|
||||
*/
|
||||
exports.TOOLBOX_AT_TOP = toolbox.Position.TOP;
|
||||
|
||||
/**
|
||||
* @see toolbox.Position.BOTTOM
|
||||
* @alias Blockly.TOOLBOX_AT_BOTTOM
|
||||
*/
|
||||
exports.TOOLBOX_AT_BOTTOM = toolbox.Position.BOTTOM;
|
||||
|
||||
/**
|
||||
* @see toolbox.Position.LEFT
|
||||
* @alias Blockly.TOOLBOX_AT_LEFT
|
||||
*/
|
||||
exports.TOOLBOX_AT_LEFT = toolbox.Position.LEFT;
|
||||
|
||||
/**
|
||||
* @see toolbox.Position.RIGHT
|
||||
* @alias Blockly.TOOLBOX_AT_RIGHT
|
||||
*/
|
||||
exports.TOOLBOX_AT_RIGHT = toolbox.Position.RIGHT;
|
||||
|
||||
/*
|
||||
* Other aliased functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Size the SVG image to completely fill its container. Call this when the view
|
||||
* actually changes sizes (e.g. on a window resize/device orientation change).
|
||||
* See workspace.resizeContents to resize the workspace when the contents
|
||||
* change (e.g. when a block is added or removed).
|
||||
* Record the height/width of the SVG image.
|
||||
* @param {!WorkspaceSvg} workspace Any workspace in the SVG.
|
||||
* @see Blockly.common.svgResize
|
||||
* @alias Blockly.svgResize
|
||||
*/
|
||||
exports.svgResize = common.svgResize;
|
||||
|
||||
/**
|
||||
* Close tooltips, context menus, dropdown selections, etc.
|
||||
* @param {boolean=} opt_onlyClosePopups Whether only popups should be closed.
|
||||
* @see Blockly.WorkspaceSvg.hideChaff
|
||||
* @alias Blockly.hideChaff
|
||||
*/
|
||||
const hideChaff = function(opt_onlyClosePopups) {
|
||||
/** @type {!WorkspaceSvg} */ (common.getMainWorkspace())
|
||||
.hideChaff(opt_onlyClosePopups);
|
||||
};
|
||||
exports.hideChaff = hideChaff;
|
||||
|
||||
/**
|
||||
* Returns the main workspace. Returns the last used main workspace (based on
|
||||
* focus). Try not to use this function, particularly if there are multiple
|
||||
* Blockly instances on a page.
|
||||
* @return {!Workspace} The main workspace.
|
||||
* @see Blockly.common.getMainWorkspace
|
||||
* @alias Blockly.getMainWorkspace
|
||||
*/
|
||||
exports.getMainWorkspace = common.getMainWorkspace;
|
||||
|
||||
/**
|
||||
* Define blocks from an array of JSON block definitions, as might be generated
|
||||
* by the Blockly Developer Tools.
|
||||
* @param {!Array<!Object>} jsonArray An array of JSON block definitions.
|
||||
* @see Blockly.common.defineBlocksWithJsonArray
|
||||
* @alias Blockly.defineBlocksWithJsonArray
|
||||
*/
|
||||
exports.defineBlocksWithJsonArray = common.defineBlocksWithJsonArray;
|
||||
|
||||
/**
|
||||
* Set the parent container. This is the container element that the WidgetDiv,
|
||||
* dropDownDiv, and Tooltip are rendered into the first time `Blockly.inject`
|
||||
* is called.
|
||||
* This method is a NOP if called after the first ``Blockly.inject``.
|
||||
* @param {!Element} container The container element.
|
||||
* @see Blockly.common.setParentContainer
|
||||
* @alias Blockly.setParentContainer
|
||||
*/
|
||||
exports.setParentContainer = common.setParentContainer;
|
||||
|
||||
/*
|
||||
* Aliased functions and properties that used to be on the Blockly namespace.
|
||||
* Everything in this section is deprecated. Both external and internal code
|
||||
* should avoid using these functions and use the designated replacements.
|
||||
* Anything in this section may be removed in a future version of Blockly.
|
||||
*/
|
||||
|
||||
// Add accessors for properties on Blockly that have now been deprecated.
|
||||
Object.defineProperties(exports, {
|
||||
/**
|
||||
* Wrapper to window.alert() that app developers may override to
|
||||
* provide alternatives to the modal browser window.
|
||||
* @name Blockly.alert
|
||||
* @type {!function(string, function()=)}
|
||||
* @deprecated Use Blockly.dialog.alert / .setAlert() instead.
|
||||
* (December 2021)
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
alert: {
|
||||
set: function(newAlert) {
|
||||
deprecation.warn('Blockly.alert', 'December 2021', 'December 2022');
|
||||
dialog.setAlert(newAlert);
|
||||
},
|
||||
get: function() {
|
||||
deprecation.warn(
|
||||
'Blockly.alert', 'December 2021', 'December 2022',
|
||||
'Blockly.dialog.alert()');
|
||||
return dialog.alert;
|
||||
},
|
||||
},
|
||||
/**
|
||||
* Wrapper to window.confirm() that app developers may override to
|
||||
* provide alternatives to the modal browser window.
|
||||
* @name Blockly.confirm
|
||||
* @type {!function(string, function()=)}
|
||||
* @deprecated Use Blockly.dialog.confirm / .setConfirm() instead.
|
||||
* (December 2021)
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
confirm: {
|
||||
set: function(newConfirm) {
|
||||
deprecation.warn('Blockly.confirm', 'December 2021', 'December 2022');
|
||||
dialog.setConfirm(newConfirm);
|
||||
},
|
||||
get: function() {
|
||||
deprecation.warn(
|
||||
'Blockly.confirm', 'December 2021', 'December 2022',
|
||||
'Blockly.dialog.confirm()');
|
||||
return dialog.confirm;
|
||||
},
|
||||
},
|
||||
/**
|
||||
* The main workspace most recently used.
|
||||
* Set by Blockly.WorkspaceSvg.prototype.markFocused
|
||||
* @name Blockly.mainWorkspace
|
||||
* @type {Workspace}
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
mainWorkspace: {
|
||||
set: function(x) {
|
||||
common.setMainWorkspace(x);
|
||||
},
|
||||
get: function() {
|
||||
return common.getMainWorkspace();
|
||||
},
|
||||
},
|
||||
/**
|
||||
* Wrapper to window.prompt() that app developers may override to
|
||||
* provide alternatives to the modal browser window. Built-in
|
||||
* browser prompts are often used for better text input experience
|
||||
* on mobile device. We strongly recommend testing mobile when
|
||||
* overriding this.
|
||||
* @name Blockly.prompt
|
||||
* @type {!function(string, string, function()=)}
|
||||
* @deprecated Use Blockly.dialog.prompt / .setPrompt() instead.
|
||||
* (December 2021)
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
prompt: {
|
||||
set: function(newPrompt) {
|
||||
deprecation.warn('Blockly.prompt', 'December 2021', 'December 2022');
|
||||
dialog.setPrompt(newPrompt);
|
||||
},
|
||||
get: function() {
|
||||
deprecation.warn(
|
||||
'Blockly.prompt', 'December 2021', 'December 2022',
|
||||
'Blockly.dialog.prompt()');
|
||||
return dialog.prompt;
|
||||
},
|
||||
},
|
||||
/**
|
||||
* Currently selected block.
|
||||
* @name Blockly.selected
|
||||
* @type {?ICopyable}
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
selected: {
|
||||
get: function() {
|
||||
return common.getSelected();
|
||||
},
|
||||
set: function(newSelection) {
|
||||
common.setSelected(newSelection);
|
||||
},
|
||||
},
|
||||
/**
|
||||
* The richness of block colours, regardless of the hue.
|
||||
* Must be in the range of 0 (inclusive) to 1 (exclusive).
|
||||
* @name Blockly.HSV_SATURATION
|
||||
* @type {number}
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
HSV_SATURATION: {
|
||||
get: function() {
|
||||
return utils.colour.getHsvSaturation();
|
||||
},
|
||||
set: function(newValue) {
|
||||
utils.colour.setHsvSaturation(newValue);
|
||||
},
|
||||
},
|
||||
/**
|
||||
* The intensity of block colours, regardless of the hue.
|
||||
* Must be in the range of 0 (inclusive) to 1 (exclusive).
|
||||
* @name Blockly.HSV_VALUE
|
||||
* @type {number}
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
HSV_VALUE: {
|
||||
get: function() {
|
||||
return utils.colour.getHsvValue();
|
||||
},
|
||||
set: function(newValue) {
|
||||
utils.colour.setHsvValue(newValue);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Returns the dimensions of the specified SVG image.
|
||||
* @param {!SVGElement} svg SVG image.
|
||||
* @return {!Size} Contains width and height properties.
|
||||
* @deprecated Use workspace.setCachedParentSvgSize. (2021 March 5)
|
||||
* @see Blockly.WorkspaceSvg.setCachedParentSvgSize
|
||||
* @alias Blockly.svgSize
|
||||
*/
|
||||
exports.svgSize = svgMath.svgSize;
|
||||
|
||||
/**
|
||||
* Size the workspace when the contents change. This also updates
|
||||
* scrollbars accordingly.
|
||||
* @param {!WorkspaceSvg} workspace The workspace to resize.
|
||||
* @deprecated Use workspace.resizeContents. (2021 December)
|
||||
* @see Blockly.WorkspaceSvg.resizeContents
|
||||
* @alias Blockly.resizeSvgContents
|
||||
*/
|
||||
const resizeSvgContentsLocal = function(workspace) {
|
||||
deprecation.warn(
|
||||
'Blockly.resizeSvgContents', 'December 2021', 'December 2022',
|
||||
'Blockly.WorkspaceSvg.resizeSvgContents');
|
||||
resizeSvgContents(workspace);
|
||||
};
|
||||
exports.resizeSvgContents = resizeSvgContentsLocal;
|
||||
|
||||
/**
|
||||
* Copy a block or workspace comment onto the local clipboard.
|
||||
* @param {!ICopyable} toCopy Block or Workspace Comment to be copied.
|
||||
* @deprecated Use Blockly.clipboard.copy(). (2021 December)
|
||||
* @see Blockly.clipboard.copy
|
||||
* @alias Blockly.copy
|
||||
*/
|
||||
const copy = function(toCopy) {
|
||||
deprecation.warn(
|
||||
'Blockly.copy', 'December 2021', 'December 2022',
|
||||
'Blockly.clipboard.copy');
|
||||
clipboard.copy(toCopy);
|
||||
};
|
||||
exports.copy = copy;
|
||||
|
||||
/**
|
||||
* Paste a block or workspace comment on to the main workspace.
|
||||
* @return {boolean} True if the paste was successful, false otherwise.
|
||||
* @deprecated Use Blockly.clipboard.paste(). (2021 December)
|
||||
* @see Blockly.clipboard.paste
|
||||
* @alias Blockly.paste
|
||||
*/
|
||||
const paste = function() {
|
||||
deprecation.warn(
|
||||
'Blockly.paste', 'December 2021', 'December 2022',
|
||||
'Blockly.clipboard.paste');
|
||||
return !!clipboard.paste();
|
||||
};
|
||||
exports.paste = paste;
|
||||
|
||||
/**
|
||||
* Duplicate this block and its children, or a workspace comment.
|
||||
* @param {!ICopyable} toDuplicate Block or Workspace Comment to be
|
||||
* copied.
|
||||
* @deprecated Use Blockly.clipboard.duplicate(). (2021 December)
|
||||
* @see Blockly.clipboard.duplicate
|
||||
* @alias Blockly.duplicate
|
||||
*/
|
||||
const duplicate = function(toDuplicate) {
|
||||
deprecation.warn(
|
||||
'Blockly.duplicate', 'December 2021', 'December 2022',
|
||||
'Blockly.clipboard.duplicate');
|
||||
clipboard.duplicate(toDuplicate);
|
||||
};
|
||||
exports.duplicate = duplicate;
|
||||
|
||||
/**
|
||||
* Is the given string a number (includes negative and decimals).
|
||||
* @param {string} str Input string.
|
||||
* @return {boolean} True if number, false otherwise.
|
||||
* @deprecated Use Blockly.utils.string.isNumber(str). (2021 December)
|
||||
* @see Blockly.utils.string.isNumber
|
||||
* @alias Blockly.isNumber
|
||||
*/
|
||||
const isNumber = function(str) {
|
||||
deprecation.warn(
|
||||
'Blockly.isNumber', 'December 2021', 'December 2022',
|
||||
'Blockly.utils.string.isNumber');
|
||||
return utils.string.isNumber(str);
|
||||
};
|
||||
exports.isNumber = isNumber;
|
||||
|
||||
/**
|
||||
* Convert a hue (HSV model) into an RGB hex triplet.
|
||||
* @param {number} hue Hue on a colour wheel (0-360).
|
||||
* @return {string} RGB code, e.g. '#5ba65b'.
|
||||
* @deprecated Use Blockly.utils.colour.hueToHex(). (2021 December)
|
||||
* @see Blockly.utils.colour.hueToHex
|
||||
* @alias Blockly.hueToHex
|
||||
*/
|
||||
const hueToHex = function(hue) {
|
||||
deprecation.warn(
|
||||
'Blockly.hueToHex', 'December 2021', 'December 2022',
|
||||
'Blockly.utils.colour.hueToHex');
|
||||
return colour.hueToHex(hue);
|
||||
};
|
||||
exports.hueToHex = hueToHex;
|
||||
|
||||
/**
|
||||
* Bind an event handler that should be called regardless of whether it is part
|
||||
* of the active touch stream.
|
||||
* Use this for events that are not part of a multi-part gesture (e.g.
|
||||
* mouseover for tooltips).
|
||||
* @param {!EventTarget} node Node upon which to listen.
|
||||
* @param {string} name Event name to listen to (e.g. 'mousedown').
|
||||
* @param {?Object} thisObject The value of 'this' in the function.
|
||||
* @param {!Function} func Function to call when event is triggered.
|
||||
* @return {!browserEvents.Data} Opaque data that can be passed to
|
||||
* unbindEvent_.
|
||||
* @deprecated Use Blockly.browserEvents.bind(). (December 2021)
|
||||
* @see Blockly.browserEvents.bind
|
||||
* @alias Blockly.bindEvent_
|
||||
*/
|
||||
const bindEvent_ = function(node, name, thisObject, func) {
|
||||
deprecation.warn(
|
||||
'Blockly.bindEvent_', 'December 2021', 'December 2022',
|
||||
'Blockly.browserEvents.bind');
|
||||
return browserEvents.bind(node, name, thisObject, func);
|
||||
};
|
||||
exports.bindEvent_ = bindEvent_;
|
||||
|
||||
/**
|
||||
* Unbind one or more events event from a function call.
|
||||
* @param {!browserEvents.Data} bindData Opaque data from bindEvent_.
|
||||
* This list is emptied during the course of calling this function.
|
||||
* @return {!Function} The function call.
|
||||
* @deprecated Use Blockly.browserEvents.unbind(). (December 2021)
|
||||
* @see browserEvents.unbind
|
||||
* @alias Blockly.unbindEvent_
|
||||
*/
|
||||
const unbindEvent_ = function(bindData) {
|
||||
deprecation.warn(
|
||||
'Blockly.unbindEvent_', 'December 2021', 'December 2022',
|
||||
'Blockly.browserEvents.unbind');
|
||||
return browserEvents.unbind(bindData);
|
||||
};
|
||||
exports.unbindEvent_ = unbindEvent_;
|
||||
|
||||
/**
|
||||
* Bind an event handler that can be ignored if it is not part of the active
|
||||
* touch stream.
|
||||
* Use this for events that either start or continue a multi-part gesture (e.g.
|
||||
* mousedown or mousemove, which may be part of a drag or click).
|
||||
* @param {!EventTarget} node Node upon which to listen.
|
||||
* @param {string} name Event name to listen to (e.g. 'mousedown').
|
||||
* @param {?Object} thisObject The value of 'this' in the function.
|
||||
* @param {!Function} func Function to call when event is triggered.
|
||||
* @param {boolean=} opt_noCaptureIdentifier True if triggering on this event
|
||||
* should not block execution of other event handlers on this touch or
|
||||
* other simultaneous touches. False by default.
|
||||
* @param {boolean=} opt_noPreventDefault True if triggering on this event
|
||||
* should prevent the default handler. False by default. If
|
||||
* opt_noPreventDefault is provided, opt_noCaptureIdentifier must also be
|
||||
* provided.
|
||||
* @return {!browserEvents.Data} Opaque data that can be passed to
|
||||
* unbindEvent_.
|
||||
* @deprecated Use Blockly.browserEvents.conditionalBind(). (December 2021)
|
||||
* @see browserEvents.conditionalBind
|
||||
* @alias Blockly.bindEventWithChecks_
|
||||
*/
|
||||
const bindEventWithChecks_ = function(
|
||||
node, name, thisObject, func, opt_noCaptureIdentifier,
|
||||
opt_noPreventDefault) {
|
||||
deprecation.warn(
|
||||
'Blockly.bindEventWithChecks_', 'December 2021', 'December 2022',
|
||||
'Blockly.browserEvents.conditionalBind');
|
||||
return browserEvents.conditionalBind(
|
||||
node, name, thisObject, func, opt_noCaptureIdentifier,
|
||||
opt_noPreventDefault);
|
||||
};
|
||||
exports.bindEventWithChecks_ = bindEventWithChecks_;
|
||||
|
||||
// Aliases to allow external code to access these values for legacy reasons.
|
||||
exports.COLLAPSE_CHARS = internalConstants.COLLAPSE_CHARS;
|
||||
exports.DRAG_STACK = internalConstants.DRAG_STACK;
|
||||
exports.OPPOSITE_TYPE = internalConstants.OPPOSITE_TYPE;
|
||||
exports.RENAME_VARIABLE_ID = internalConstants.RENAME_VARIABLE_ID;
|
||||
exports.DELETE_VARIABLE_ID = internalConstants.DELETE_VARIABLE_ID;
|
||||
exports.COLLAPSED_INPUT_NAME = constants.COLLAPSED_INPUT_NAME;
|
||||
exports.COLLAPSED_FIELD_NAME = constants.COLLAPSED_FIELD_NAME;
|
||||
|
||||
/**
|
||||
* String for use in the "custom" attribute of a category in toolbox XML.
|
||||
* This string indicates that the category should be dynamically populated with
|
||||
* variable blocks.
|
||||
* @const {string}
|
||||
* @alias Blockly.VARIABLE_CATEGORY_NAME
|
||||
*/
|
||||
exports.VARIABLE_CATEGORY_NAME = Variables.CATEGORY_NAME;
|
||||
|
||||
/**
|
||||
* String for use in the "custom" attribute of a category in toolbox XML.
|
||||
* This string indicates that the category should be dynamically populated with
|
||||
* variable blocks.
|
||||
* @const {string}
|
||||
* @alias Blockly.VARIABLE_DYNAMIC_CATEGORY_NAME
|
||||
*/
|
||||
exports.VARIABLE_DYNAMIC_CATEGORY_NAME = VariablesDynamic.CATEGORY_NAME;
|
||||
/**
|
||||
* String for use in the "custom" attribute of a category in toolbox XML.
|
||||
* This string indicates that the category should be dynamically populated with
|
||||
* procedure blocks.
|
||||
* @const {string}
|
||||
* @alias Blockly.PROCEDURE_CATEGORY_NAME
|
||||
*/
|
||||
exports.PROCEDURE_CATEGORY_NAME = Procedures.CATEGORY_NAME;
|
||||
|
||||
// Re-export submodules that no longer declareLegacyNamespace.
|
||||
exports.ASTNode = ASTNode;
|
||||
exports.BasicCursor = BasicCursor;
|
||||
exports.Block = Block;
|
||||
exports.BlocklyOptions = BlocklyOptions;
|
||||
exports.BlockDragger = BlockDragger;
|
||||
exports.BlockDragSurfaceSvg = BlockDragSurfaceSvg;
|
||||
exports.BlockSvg = BlockSvg;
|
||||
exports.Blocks = Blocks;
|
||||
exports.Bubble = Bubble;
|
||||
exports.BubbleDragger = BubbleDragger;
|
||||
exports.CollapsibleToolboxCategory = CollapsibleToolboxCategory;
|
||||
exports.Comment = Comment;
|
||||
exports.ComponentManager = ComponentManager;
|
||||
exports.Connection = Connection;
|
||||
exports.ConnectionType = ConnectionType;
|
||||
exports.ConnectionChecker = ConnectionChecker;
|
||||
exports.ConnectionDB = ConnectionDB;
|
||||
exports.ContextMenu = ContextMenu;
|
||||
exports.ContextMenuItems = ContextMenuItems;
|
||||
exports.ContextMenuRegistry = ContextMenuRegistry;
|
||||
exports.Css = Css;
|
||||
exports.Cursor = Cursor;
|
||||
exports.DeleteArea = DeleteArea;
|
||||
exports.DragTarget = DragTarget;
|
||||
exports.DropDownDiv = dropDownDiv;
|
||||
exports.Events = Events;
|
||||
exports.Extensions = Extensions;
|
||||
exports.Field = Field;
|
||||
exports.FieldAngle = FieldAngle;
|
||||
exports.FieldCheckbox = FieldCheckbox;
|
||||
exports.FieldColour = FieldColour;
|
||||
exports.FieldDropdown = FieldDropdown;
|
||||
exports.FieldImage = FieldImage;
|
||||
exports.FieldLabel = FieldLabel;
|
||||
exports.FieldLabelSerializable = FieldLabelSerializable;
|
||||
exports.FieldMultilineInput = FieldMultilineInput;
|
||||
exports.FieldNumber = FieldNumber;
|
||||
exports.FieldTextInput = FieldTextInput;
|
||||
exports.FieldVariable = FieldVariable;
|
||||
exports.Flyout = Flyout;
|
||||
exports.FlyoutButton = FlyoutButton;
|
||||
exports.FlyoutMetricsManager = FlyoutMetricsManager;
|
||||
exports.Generator = Generator;
|
||||
exports.Gesture = Gesture;
|
||||
exports.Grid = Grid;
|
||||
exports.HorizontalFlyout = HorizontalFlyout;
|
||||
exports.IASTNodeLocation = IASTNodeLocation;
|
||||
exports.IASTNodeLocationSvg = IASTNodeLocationSvg;
|
||||
exports.IASTNodeLocationWithBlock = IASTNodeLocationWithBlock;
|
||||
exports.IAutoHideable = IAutoHideable;
|
||||
exports.IBlockDragger = IBlockDragger;
|
||||
exports.IBoundedElement = IBoundedElement;
|
||||
exports.IBubble = IBubble;
|
||||
exports.ICollapsibleToolboxItem = ICollapsibleToolboxItem;
|
||||
exports.IComponent = IComponent;
|
||||
exports.IConnectionChecker = IConnectionChecker;
|
||||
exports.IContextMenu = IContextMenu;
|
||||
exports.Icon = Icon;
|
||||
exports.ICopyable = ICopyable;
|
||||
exports.IDeletable = IDeletable;
|
||||
exports.IDeleteArea = IDeleteArea;
|
||||
exports.IDragTarget = IDragTarget;
|
||||
exports.IDraggable = IDraggable;
|
||||
exports.IFlyout = IFlyout;
|
||||
exports.IKeyboardAccessible = IKeyboardAccessible;
|
||||
exports.IMetricsManager = IMetricsManager;
|
||||
exports.IMovable = IMovable;
|
||||
exports.Input = Input;
|
||||
exports.InsertionMarkerManager = InsertionMarkerManager;
|
||||
exports.IPositionable = IPositionable;
|
||||
exports.IRegistrable = IRegistrable;
|
||||
exports.IRegistrableField = IRegistrableField;
|
||||
exports.ISelectable = ISelectable;
|
||||
exports.ISelectableToolboxItem = ISelectableToolboxItem;
|
||||
exports.IStyleable = IStyleable;
|
||||
exports.IToolbox = IToolbox;
|
||||
exports.IToolboxItem = IToolboxItem;
|
||||
exports.Marker = Marker;
|
||||
exports.MarkerManager = MarkerManager;
|
||||
exports.Menu = Menu;
|
||||
exports.MenuItem = MenuItem;
|
||||
exports.MetricsManager = MetricsManager;
|
||||
exports.Mutator = Mutator;
|
||||
exports.Msg = Msg;
|
||||
exports.Names = Names;
|
||||
exports.Options = Options;
|
||||
exports.Procedures = Procedures;
|
||||
exports.RenderedConnection = RenderedConnection;
|
||||
exports.Scrollbar = Scrollbar;
|
||||
exports.ScrollbarPair = ScrollbarPair;
|
||||
exports.ShortcutItems = ShortcutItems;
|
||||
exports.ShortcutRegistry = ShortcutRegistry;
|
||||
exports.TabNavigateCursor = TabNavigateCursor;
|
||||
exports.Theme = Theme;
|
||||
exports.Themes = Themes;
|
||||
exports.ThemeManager = ThemeManager;
|
||||
exports.Toolbox = Toolbox;
|
||||
exports.ToolboxCategory = ToolboxCategory;
|
||||
exports.ToolboxItem = ToolboxItem;
|
||||
exports.ToolboxSeparator = ToolboxSeparator;
|
||||
exports.Tooltip = Tooltip;
|
||||
exports.Touch = Touch;
|
||||
exports.TouchGesture = TouchGesture;
|
||||
exports.Trashcan = Trashcan;
|
||||
exports.VariableMap = VariableMap;
|
||||
exports.VariableModel = VariableModel;
|
||||
exports.Variables = Variables;
|
||||
exports.VariablesDynamic = VariablesDynamic;
|
||||
exports.VerticalFlyout = VerticalFlyout;
|
||||
exports.Warning = Warning;
|
||||
exports.WidgetDiv = WidgetDiv;
|
||||
exports.Workspace = Workspace;
|
||||
exports.WorkspaceAudio = WorkspaceAudio;
|
||||
exports.WorkspaceComment = WorkspaceComment;
|
||||
exports.WorkspaceCommentSvg = WorkspaceCommentSvg;
|
||||
exports.WorkspaceDragSurfaceSvg = WorkspaceDragSurfaceSvg;
|
||||
exports.WorkspaceDragger = WorkspaceDragger;
|
||||
exports.WorkspaceSvg = WorkspaceSvg;
|
||||
exports.Xml = Xml;
|
||||
exports.ZoomControls = ZoomControls;
|
||||
exports.blockAnimations = blockAnimations;
|
||||
exports.blockRendering = blockRendering;
|
||||
exports.browserEvents = browserEvents;
|
||||
exports.bumpObjects = bumpObjects;
|
||||
exports.clipboard = clipboard;
|
||||
exports.common = common;
|
||||
exports.config = config;
|
||||
/** @deprecated Use Blockly.ConnectionType instead. */
|
||||
exports.connectionTypes = ConnectionType;
|
||||
exports.constants = constants;
|
||||
exports.dialog = dialog;
|
||||
exports.fieldRegistry = fieldRegistry;
|
||||
exports.geras = geras;
|
||||
exports.inject = inject;
|
||||
exports.inputTypes = inputTypes;
|
||||
exports.minimalist = minimalist;
|
||||
exports.registry = registry;
|
||||
exports.serialization = {
|
||||
blocks: serializationBlocks,
|
||||
exceptions: serializationExceptions,
|
||||
priorities: serializationPriorities,
|
||||
registry: serializationRegistry,
|
||||
variables: serializationVariables,
|
||||
workspaces: serializationWorkspaces,
|
||||
ISerializer: ISerializer,
|
||||
};
|
||||
exports.thrasos = thrasos;
|
||||
exports.uiPosition = uiPosition;
|
||||
exports.utils = utils;
|
||||
exports.zelos = zelos;
|
||||
|
||||
// If Blockly is compiled with ADVANCED_COMPILATION and/or loaded as a
|
||||
// CJS or ES module there will not be a Blockly global variable
|
||||
// created. This can cause problems because a very common way of
|
||||
// loading translations is to use a <script> tag to load one of
|
||||
// msg/js/*.js, which consists of lines like:
|
||||
//
|
||||
// Blockly.Msg["ADD_COMMENT"] = "Add Comment";
|
||||
// Blockly.Msg["CLEAN_UP"] = "Clean up Blocks";
|
||||
//
|
||||
// This obviously only works if Blockly.Msg is the Msg export from the
|
||||
// Blockly.Msg module - so make sure it is, but only if there is not
|
||||
// yet a Blockly global variable.
|
||||
if (!('Blockly' in globalThis)) {
|
||||
globalThis['Blockly'] = {'Msg': Msg};
|
||||
}
|
||||
|
||||
// Temporary hack to copy accessor properties from exports to the
|
||||
// global Blockly object as the routine to copy exports in
|
||||
// goog.exportPath_ (see closure/goog/base.js) invoked by
|
||||
// declareLegacyNamespace only copies normal data properties, not
|
||||
// accessors. This can be removed once all remaining calls to
|
||||
// declareLegacyNamspace have been removed.
|
||||
//
|
||||
// This is only needed in uncompiled mode (see
|
||||
// google/blockly-samples#902); in compiled mode the exports object is
|
||||
// already the value of globalThis['Blockly'].
|
||||
//
|
||||
// Note that this code will still attempt to redefine accessors on a
|
||||
// previously-imported copy of the Blockly library if both are
|
||||
// imported in uncompiled mode. This will fail with TypeError as the
|
||||
// accessors are nonconfigurable (which is good, as otherwise one
|
||||
// accessors on one copy would call get/set functions on the other
|
||||
// copy!)
|
||||
/* eslint-disable-next-line no-undef */
|
||||
if (!COMPILED && typeof globalThis['Blockly'] === 'object' &&
|
||||
globalThis['Blockly'] !== exports) {
|
||||
const descriptors = Object.getOwnPropertyDescriptors(exports);
|
||||
const accessors = {};
|
||||
for (const key in descriptors) {
|
||||
if (descriptors[key].get || descriptors[key].set) {
|
||||
accessors[key] = descriptors[key];
|
||||
}
|
||||
}
|
||||
Object.defineProperties(globalThis['Blockly'], accessors);
|
||||
}
|
||||
+5
-5
@@ -16,15 +16,15 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_create';
|
||||
import './events/events_block_create.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/workspace_events';
|
||||
import './events/workspace_events.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_ui';
|
||||
import './events/events_ui.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_ui_base';
|
||||
import './events/events_ui_base.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_var_create';
|
||||
import './events/events_var_create.js';
|
||||
|
||||
import {Block} from './block.js';
|
||||
import * as blockAnimations from './block_animations.js';
|
||||
|
||||
+2
-2
@@ -17,9 +17,9 @@ goog.declareModuleId('Blockly.Bubble');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './metrics_manager';
|
||||
import './metrics_manager.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './workspace';
|
||||
import './workspace.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockDragSurfaceSvg} from './block_drag_surface.js';
|
||||
|
||||
@@ -16,9 +16,9 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.BubbleDragger');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './bubble';
|
||||
import './bubble.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './constants';
|
||||
import './constants.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockDragSurfaceSvg} from './block_drag_surface.js';
|
||||
|
||||
+5
-5
@@ -17,16 +17,16 @@ goog.declareModuleId('Blockly.Comment');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './block';
|
||||
import './block.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './workspace_svg';
|
||||
import './workspace_svg.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_bubble_open';
|
||||
import './events/events_bubble_open.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './warning';
|
||||
import './warning.js';
|
||||
|
||||
import {CommentModel} from './block.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Connection');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './constants';
|
||||
import './constants.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -20,7 +20,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.ConnectionDB');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './constants';
|
||||
import './constants.js';
|
||||
|
||||
import {ConnectionType} from './connection_type.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
+7
-3
@@ -124,11 +124,15 @@ function populate_(
|
||||
menu.addChild(menuItem);
|
||||
menuItem.setEnabled(option.enabled);
|
||||
if (option.enabled) {
|
||||
const actionHandler = function(this: ContextMenuOption) {
|
||||
const actionHandler = function() {
|
||||
hide();
|
||||
this.callback(this.scope);
|
||||
// If .scope does not exist on the option, then the callback will not
|
||||
// be expecting a scope parameter, so there should be no problems. Just
|
||||
// assume it is a ContextMenuOption and we'll pass undefined if it's
|
||||
// not.
|
||||
option.callback((option as ContextMenuOption).scope);
|
||||
};
|
||||
menuItem.onAction(actionHandler, option);
|
||||
menuItem.onAction(actionHandler, {});
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ export const ANIMATION_TIME = 0.25;
|
||||
* Timer for animation out, to be cleared if we need to immediately hide
|
||||
* without disrupting new shows.
|
||||
*/
|
||||
let animateOutTimer: number|null = null;
|
||||
let animateOutTimer: AnyDuringMigration = null;
|
||||
|
||||
/** Callback for when the drop-down is hidden. */
|
||||
let onHide: Function|null = null;
|
||||
|
||||
@@ -95,8 +95,9 @@ export abstract class Abstract {
|
||||
* Get workspace the event belongs to.
|
||||
* @return The workspace the event belongs to.
|
||||
* @throws {Error} if workspace is null.
|
||||
* @internal
|
||||
*/
|
||||
protected getEventWorkspace_(): Workspace {
|
||||
getEventWorkspace_(): Workspace {
|
||||
let workspace;
|
||||
if (this.workspaceId) {
|
||||
workspace = Workspace.getById(this.workspaceId);
|
||||
|
||||
@@ -118,7 +118,7 @@ export class BlockChange extends BlockBase {
|
||||
const value = forward ? this.newValue : this.oldValue;
|
||||
switch (this.element) {
|
||||
case 'field': {
|
||||
const field = block.getField(this.name);
|
||||
const field = block.getField(this.name!);
|
||||
if (field) {
|
||||
field.setValue(value);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Extensions');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './mutator';
|
||||
import './mutator.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
+3
-3
@@ -21,11 +21,11 @@ goog.declareModuleId('Blockly.Field');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './shortcut_registry';
|
||||
import './shortcut_registry.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './gesture';
|
||||
import './gesture.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.FieldCheckbox');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
|
||||
import {Field} from './field.js';
|
||||
import * as fieldRegistry from './field_registry.js';
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.FieldColour');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
|
||||
import {BlockSvg} from './block_svg.js';
|
||||
import * as browserEvents from './browser_events.js';
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.FieldTextInput');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockSvg} from './block_svg.js';
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.FieldVariable');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -63,7 +63,7 @@ export class FlyoutButton {
|
||||
* @param workspace The workspace in which to place this button.
|
||||
* @param targetWorkspace The flyout's target workspace.
|
||||
* @param json The JSON specifying the label/button.
|
||||
* @param isLabel Whether this button should be styled as a label.
|
||||
* @param isLabel_ Whether this button should be styled as a label.
|
||||
* @internal
|
||||
*/
|
||||
constructor(
|
||||
|
||||
@@ -16,9 +16,9 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.VerticalFlyout');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './block';
|
||||
import './block.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './constants';
|
||||
import './constants.js';
|
||||
|
||||
import * as browserEvents from './browser_events.js';
|
||||
import * as dropDownDiv from './dropdowndiv.js';
|
||||
|
||||
+2
-2
@@ -18,9 +18,9 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Gesture');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './block_dragger';
|
||||
import './block_dragger.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_click';
|
||||
import './events/events_click.js';
|
||||
|
||||
import * as blockAnimations from './block_animations.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.inject');
|
||||
|
||||
import 'angular-mocks';
|
||||
|
||||
import {BlockDragSurfaceSvg} from './block_drag_surface.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlocklyOptions} from './blockly_options.js';
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Input');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './field_label';
|
||||
import './field_label.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -19,7 +19,7 @@ goog.declareModuleId('Blockly.IASTNodeLocationWithBlock');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../block';
|
||||
import '../block.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {IASTNodeLocation} from './i_ast_node_location.js';
|
||||
|
||||
@@ -17,10 +17,10 @@ goog.declareModuleId('Blockly.IBlockDragger');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../block_svg';
|
||||
import '../block_svg.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/coordinate';
|
||||
import '../utils/coordinate.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.IBoundedElement');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/rect';
|
||||
import '../utils/rect.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,10 +17,10 @@ goog.declareModuleId('Blockly.IBubble');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../block_drag_surface';
|
||||
import '../block_drag_surface.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/coordinate';
|
||||
import '../utils/coordinate.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {IContextMenu} from './i_contextmenu.js';
|
||||
|
||||
@@ -18,7 +18,7 @@ goog.declareModuleId('Blockly.ICollapsibleToolboxItem');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './i_toolbox_item';
|
||||
import './i_toolbox_item.js';
|
||||
|
||||
import {ISelectableToolboxItem} from './i_selectable_toolbox_item.js';
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ goog.declareModuleId('Blockly.IConnectionChecker');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../connection';
|
||||
import '../connection.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../rendered_connection';
|
||||
import '../rendered_connection.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@ goog.declareModuleId('Blockly.IDeleteArea');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './i_draggable';
|
||||
import './i_draggable.js';
|
||||
|
||||
import {IDragTarget} from './i_drag_target.js';
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ goog.declareModuleId('Blockly.IDragTarget');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './i_draggable';
|
||||
import './i_draggable.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/rect';
|
||||
import '../utils/rect.js';
|
||||
|
||||
import {IComponent} from './i_component.js';
|
||||
|
||||
|
||||
@@ -17,16 +17,16 @@ goog.declareModuleId('Blockly.IFlyout');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/toolbox';
|
||||
import '../utils/toolbox.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../block_svg';
|
||||
import '../block_svg.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/coordinate';
|
||||
import '../utils/coordinate.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/svg';
|
||||
import '../utils/svg.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {WorkspaceSvg} from '../workspace_svg.js';
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.IKeyboardAccessible');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../shortcut_registry';
|
||||
import '../shortcut_registry.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,13 +17,13 @@ goog.declareModuleId('Blockly.IMetricsManager');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../metrics_manager';
|
||||
import '../metrics_manager.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/metrics';
|
||||
import '../utils/metrics.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/size';
|
||||
import '../utils/size.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,10 +18,10 @@ goog.declareModuleId('Blockly.IPositionable');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../metrics_manager';
|
||||
import '../metrics_manager.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/rect';
|
||||
import '../utils/rect.js';
|
||||
|
||||
import {IComponent} from './i_component.js';
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.ISelectableToolboxItem');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/toolbox';
|
||||
import '../utils/toolbox.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {IToolboxItem} from './i_toolbox_item.js';
|
||||
|
||||
@@ -17,16 +17,16 @@ goog.declareModuleId('Blockly.IToolbox');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../utils/toolbox';
|
||||
import '../utils/toolbox.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './i_flyout';
|
||||
import './i_flyout.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './i_toolbox_item';
|
||||
import './i_toolbox_item.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../workspace_svg';
|
||||
import '../workspace_svg.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {IRegistrable} from './i_registrable.js';
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Mutator');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_bubble_open';
|
||||
import './events/events_bubble_open.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
@@ -83,7 +83,7 @@ export class Mutator extends Icon {
|
||||
* The PID associated with the updateWorkpace_ timeout, or 0 if no timeout
|
||||
* is currently running.
|
||||
*/
|
||||
private updateWorkspacePid_ = 0;
|
||||
private updateWorkspacePid_: AnyDuringMigration = 0;
|
||||
|
||||
/** @param quarkNames List of names of sub-blocks for flyout. */
|
||||
constructor(block: BlockSvg, quarkNames: string[]) {
|
||||
@@ -397,7 +397,7 @@ export class Mutator extends Icon {
|
||||
shouldIgnoreMutatorEvent_(e: Abstract) {
|
||||
return e.isUiEvent || e.type === eventUtils.CREATE ||
|
||||
e.type === eventUtils.CHANGE &&
|
||||
/** @type {!BlockChange} */ (e).element === 'disabled';
|
||||
(e as BlockChange).element === 'disabled';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-4
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Names');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './procedures';
|
||||
import './procedures.js';
|
||||
|
||||
import {Msg} from './msg.js';
|
||||
import * as Procedures from './procedures.js';
|
||||
@@ -134,9 +134,10 @@ export class Names {
|
||||
populateProcedures(workspace: Workspace) {
|
||||
let procedures = Procedures.allProcedures(workspace);
|
||||
// Flatten the return vs no-return procedure lists.
|
||||
procedures = procedures[0].concat(procedures[1]);
|
||||
for (let i = 0; i < procedures.length; i++) {
|
||||
this.getName(procedures[i][0], NameType.PROCEDURE);
|
||||
let flattenedProcedures: AnyDuringMigration[][] =
|
||||
procedures[0].concat(procedures[1]);
|
||||
for (let i = 0; i < flattenedProcedures.length; i++) {
|
||||
this.getName(flattenedProcedures[i][0], NameType.PROCEDURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.uiPosition');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './metrics_manager';
|
||||
import './metrics_manager.js';
|
||||
|
||||
import {UiMetrics} from './metrics_manager.js';
|
||||
import {Scrollbar} from './scrollbar.js';
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Procedures');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_change';
|
||||
import './events/events_block_change.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -19,13 +19,13 @@ goog.declareModuleId('Blockly.blockRendering.IPathObject');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../block_svg';
|
||||
import '../../block_svg.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../connection';
|
||||
import '../../connection.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../theme';
|
||||
import '../../theme.js';
|
||||
|
||||
import {BlockStyle} from '../../theme.js';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as goog from '../../../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.blockRendering.MarkerSvg');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../events/events_marker_move';
|
||||
import '../../events/events_marker_move.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockSvg} from '../../block_svg.js';
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.blockRendering.PathObject');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../theme';
|
||||
import '../../theme.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockSvg} from '../../block_svg.js';
|
||||
|
||||
@@ -19,7 +19,7 @@ goog.declareModuleId('Blockly.geras.Highlighter');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './renderer';
|
||||
import './renderer.js';
|
||||
|
||||
import * as svgPaths from '../../utils/svg_paths.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.geras.PathObject');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../theme';
|
||||
import '../../theme.js';
|
||||
|
||||
import {BlockSvg} from '../../block_svg.js';
|
||||
import {BlockStyle} from '../../theme.js';
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.geras.Renderer');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../common/constants';
|
||||
import '../common/constants.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockSvg} from '../../block_svg.js';
|
||||
|
||||
@@ -141,7 +141,7 @@ export class Row {
|
||||
/** The type of this rendering object. */
|
||||
this.type = Types.ROW;
|
||||
|
||||
this.notchOffset = this.constants.NOTCH_OFFSET_LEFT;
|
||||
this.notchOffset = this.constants_.NOTCH_OFFSET_LEFT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,7 +48,7 @@ export class SpacerRow extends Row {
|
||||
super(constants);
|
||||
this.type |= Types.SPACER | Types.BETWEEN_ROW_SPACER;
|
||||
|
||||
this.elements = [new InRowSpacer(this.constants, width)];
|
||||
this.elements = [new InRowSpacer(this.constants_, width)];
|
||||
}
|
||||
|
||||
override measure() {}
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.zelos.PathObject');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../theme';
|
||||
import '../../theme.js';
|
||||
|
||||
import {BlockSvg} from '../../block_svg.js';
|
||||
import {Connection} from '../../connection.js';
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.declareModuleId('Blockly.zelos.Renderer');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../../theme';
|
||||
import '../../theme.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockSvg} from '../../block_svg.js';
|
||||
|
||||
@@ -332,7 +332,7 @@ export interface KeyboardShortcut {
|
||||
preconditionFn?: ((p1: Workspace) => boolean);
|
||||
metadata?: object;
|
||||
keyCodes?: (number|string)[];
|
||||
allowCollsion?: boolean;
|
||||
allowCollision?: boolean;
|
||||
}
|
||||
|
||||
// Creates and assigns the singleton instance.
|
||||
|
||||
@@ -50,4 +50,5 @@ const categoryStyles = {
|
||||
* Contains multi-coloured border to create shadow effect.
|
||||
* @alias Blockly.Themes.Classic
|
||||
*/
|
||||
export const Classic = new Theme('classic', defaultBlockStyles, categoryStyles);
|
||||
export const Classic = new Theme(
|
||||
'classic', defaultBlockStyles as AnyDuringMigration, categoryStyles);
|
||||
|
||||
@@ -174,7 +174,8 @@ export class ToolboxCategory extends ToolboxItem implements
|
||||
this.colour_ = this.getColour_(categoryDef);
|
||||
Object.assign(
|
||||
this.cssConfig_,
|
||||
(categoryDef as any)['cssconfig'] || categoryDef['cssConfig']);
|
||||
categoryDef['cssconfig'] ||
|
||||
(categoryDef as AnyDuringMigration)['cssConfig']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,9 +17,9 @@ goog.declareModuleId('Blockly.Toolbox');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../shortcut_registry';
|
||||
import '../shortcut_registry.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../events/events_toolbox_item_select';
|
||||
import '../events/events_toolbox_item_select.js';
|
||||
|
||||
import {BlockSvg} from '../block_svg.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
+5
-5
@@ -88,10 +88,10 @@ let blocked = false;
|
||||
export const LIMIT = 50;
|
||||
|
||||
/** PID of suspended thread to clear tooltip on mouse out. */
|
||||
let mouseOutPid = 0;
|
||||
let mouseOutPid: AnyDuringMigration = 0;
|
||||
|
||||
/** PID of suspended thread to show the tooltip. */
|
||||
let showPid = 0;
|
||||
let showPid: AnyDuringMigration = 0;
|
||||
|
||||
/**
|
||||
* Last observed X location of the mouse pointer (freezes when tooltip appears).
|
||||
@@ -342,8 +342,8 @@ export function dispose() {
|
||||
export function hide() {
|
||||
if (visible) {
|
||||
visible = false;
|
||||
if (DIV) {
|
||||
DIV.style.display = 'none';
|
||||
if (containerDiv) {
|
||||
containerDiv.style.display = 'none';
|
||||
}
|
||||
}
|
||||
if (showPid) {
|
||||
@@ -379,7 +379,7 @@ function renderContent() {
|
||||
return;
|
||||
}
|
||||
if (typeof customTooltip === 'function') {
|
||||
customTooltip(DIV, element);
|
||||
customTooltip(containerDiv, element);
|
||||
} else {
|
||||
renderDefaultContent();
|
||||
}
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ export const TOUCH_MAP: {[key: string]: string[]} = globalThis['PointerEvent'] ?
|
||||
};
|
||||
|
||||
/** PID of queued long-press task. */
|
||||
let longPid_ = 0;
|
||||
let longPid_: AnyDuringMigration = 0;
|
||||
|
||||
/**
|
||||
* Context menus on touch devices are activated using a long-press.
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@ goog.declareModuleId('Blockly.Trashcan');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './metrics_manager';
|
||||
import './metrics_manager.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_trashcan_open';
|
||||
import './events/events_trashcan_open.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlocklyOptions} from './blockly_options.js';
|
||||
@@ -100,7 +100,7 @@ export class Trashcan extends DeleteArea implements IAutoHideable,
|
||||
private svgLid_: SVGElement = null as AnyDuringMigration;
|
||||
|
||||
/** Task ID of opening/closing animation. */
|
||||
private lidTask_ = 0;
|
||||
private lidTask_: AnyDuringMigration = 0;
|
||||
|
||||
/** Current state of lid opening (0.0 = closed, 1.0 = open). */
|
||||
private lidOpen_ = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import * as goog from '../../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.utils.object');
|
||||
|
||||
import * as deprecation from './utils/deprecation.js';
|
||||
import * as deprecation from './deprecation.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import * as goog from '../../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.utils.string');
|
||||
|
||||
import * as deprecation from './utils/deprecation.js';
|
||||
import * as deprecation from './deprecation.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,8 +56,8 @@ export function getRelativeXY(element: Element): Coordinate {
|
||||
// Checking for the existence of x/y properties is faster than getAttribute.
|
||||
// However, x/y contains an SVGAnimatedLength object, so rely on getAttribute
|
||||
// to get the number.
|
||||
const x = element.x && element.getAttribute('x');
|
||||
const y = element.y && element.getAttribute('y');
|
||||
const x = (element as any).x && element.getAttribute('x');
|
||||
const y = (element as any).y && element.getAttribute('y');
|
||||
if (x) {
|
||||
xy.x = parseInt(x, 10);
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ goog.declareModuleId('Blockly.utils.toolbox');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../toolbox/category';
|
||||
import '../toolbox/category.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import '../toolbox/separator';
|
||||
import '../toolbox/separator.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {ConnectionState} from '../serialization/blocks.js';
|
||||
|
||||
@@ -16,9 +16,9 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.VariableMap');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_var_delete';
|
||||
import './events/events_var_delete.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_var_rename';
|
||||
import './events/events_var_rename.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.VariableModel');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_var_create';
|
||||
import './events/events_var_create.js';
|
||||
|
||||
import * as eventUtils from './events/utils.js';
|
||||
import * as idGenerator from './utils/idgenerator.js';
|
||||
|
||||
@@ -88,6 +88,18 @@ export function allDeveloperVariables(workspace: Workspace): string[] {
|
||||
const variableHash = Object.create(null);
|
||||
for (let i = 0, block; block = blocks[i]; i++) {
|
||||
let getDeveloperVariables = block.getDeveloperVariables;
|
||||
if (!getDeveloperVariables &&
|
||||
(block as AnyDuringMigration).getDeveloperVars) {
|
||||
// August 2018: getDeveloperVars() was deprecated and renamed
|
||||
// getDeveloperVariables().
|
||||
getDeveloperVariables = (block as AnyDuringMigration).getDeveloperVars;
|
||||
if (!ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE[block.type]) {
|
||||
console.warn(
|
||||
'Function getDeveloperVars() deprecated. Use ' +
|
||||
'getDeveloperVariables() (block type \'' + block.type + '\')');
|
||||
ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE[block.type] = true;
|
||||
}
|
||||
}
|
||||
if (getDeveloperVariables) {
|
||||
const devVars = block.getDeveloperVariables!();
|
||||
for (let j = 0; j < devVars.length; j++) {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Warning');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_bubble_open';
|
||||
import './events/events_bubble_open.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockSvg} from './block_svg.js';
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Workspace');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './connection_checker';
|
||||
import './connection_checker.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -88,7 +88,7 @@ export class WorkspaceAudio {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sound && sound.play) {
|
||||
if (sound) {
|
||||
this.SOUNDS_[name] = sound;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.WorkspaceComment');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_comment_change';
|
||||
import './events/events_comment_change.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_comment_create';
|
||||
import './events/events_comment_create.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_comment_delete';
|
||||
import './events/events_comment_delete.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {CommentMove} from './events/events_comment_move.js';
|
||||
|
||||
@@ -16,11 +16,11 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.WorkspaceCommentSvg');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_comment_create';
|
||||
import './events/events_comment_create.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_comment_delete';
|
||||
import './events/events_comment_delete.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_selected';
|
||||
import './events/events_selected.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {BlockDragSurfaceSvg} from './block_drag_surface.js';
|
||||
|
||||
+13
-12
@@ -17,29 +17,29 @@ goog.declareModuleId('Blockly.WorkspaceSvg');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './procedures';
|
||||
import './procedures.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './variables';
|
||||
import './variables.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './variables_dynamic';
|
||||
import './variables_dynamic.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './rendered_connection';
|
||||
import './rendered_connection.js';
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './zoom_controls';
|
||||
import './zoom_controls.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_block_create';
|
||||
import './events/events_block_create.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_theme_change';
|
||||
import './events/events_theme_change.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_viewport';
|
||||
import './events/events_viewport.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './metrics_manager';
|
||||
import './metrics_manager.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './msg';
|
||||
import './msg.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
@@ -1558,11 +1558,12 @@ export class WorkspaceSvg extends Workspace implements IASTNodeLocationSvg {
|
||||
*/
|
||||
private pasteWorkspaceComment_(xmlComment: Element): WorkspaceCommentSvg {
|
||||
eventUtils.disable();
|
||||
let comment;
|
||||
let comment: WorkspaceCommentSvg;
|
||||
try {
|
||||
// AnyDuringMigration because: Property 'get' does not exist on type
|
||||
// '(name: string) => void'.
|
||||
comment = WorkspaceCommentSvg.fromXml(xmlComment, this);
|
||||
comment =
|
||||
WorkspaceCommentSvg.fromXml(xmlComment, this) as AnyDuringMigration;
|
||||
// Move the duplicate to original position.
|
||||
// AnyDuringMigration because: Argument of type 'string | null' is not
|
||||
// assignable to parameter of type 'string'.
|
||||
|
||||
+4
-4
@@ -16,13 +16,13 @@ import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Xml');
|
||||
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './comment';
|
||||
import './comment.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './variables';
|
||||
import './variables.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './workspace_comment';
|
||||
import './workspace_comment.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './workspace_comment_svg';
|
||||
import './workspace_comment_svg.js';
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
import {Block} from './block.js';
|
||||
|
||||
@@ -17,9 +17,9 @@ goog.declareModuleId('Blockly.ZoomControls');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './metrics_manager';
|
||||
import './metrics_manager.js';
|
||||
// Unused import preserved for side-effects. Remove if unneeded.
|
||||
import './events/events_click';
|
||||
import './events/events_click.js';
|
||||
|
||||
import * as browserEvents from './browser_events.js';
|
||||
import {ComponentManager} from './component_manager.js';
|
||||
|
||||
@@ -172,7 +172,7 @@ function stripApacheLicense() {
|
||||
*/
|
||||
var JSCOMP_ERROR = [
|
||||
// 'accessControls', // Deprecated; means same as visibility.
|
||||
'checkPrototypalTypes',
|
||||
// 'checkPrototypalTypes', // override annotations are stripped by tsc.
|
||||
'checkRegExp',
|
||||
// 'checkTypes', // Disabled; see note in JSCOMP_OFF.
|
||||
'checkVars',
|
||||
@@ -186,12 +186,12 @@ var JSCOMP_ERROR = [
|
||||
'externsValidation',
|
||||
'extraRequire', // Undocumented but valid.
|
||||
'functionParams',
|
||||
'globalThis',
|
||||
// 'globalThis', // This types are stripped by tsc.
|
||||
'invalidCasts',
|
||||
'misplacedTypeAnnotation',
|
||||
// 'missingOverride', // There are many of these, which should be fixed.
|
||||
'missingPolyfill',
|
||||
'missingProperties',
|
||||
// 'missingProperties', // Unset static properties are stripped by tsc.
|
||||
'missingProvide',
|
||||
'missingRequire',
|
||||
'missingReturn',
|
||||
|
||||
+167
-168
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"chunk": [
|
||||
"blockly:260",
|
||||
"blockly:259",
|
||||
"blocks:10:blockly",
|
||||
"all:11:blockly",
|
||||
"all1:11:blockly",
|
||||
@@ -10,13 +10,45 @@
|
||||
],
|
||||
"js": [
|
||||
"./build/src/core/inject.js",
|
||||
"./build/src/core/workspace_drag_surface_svg.js",
|
||||
"./build/src/core/flyout_vertical.js",
|
||||
"./build/src/core/toolbox/toolbox.js",
|
||||
"./build/src/core/interfaces/i_toolbox.js",
|
||||
"./build/src/core/interfaces/i_styleable.js",
|
||||
"./build/src/core/interfaces/i_serializer.js",
|
||||
"./build/src/core/interfaces/i_selectable.js",
|
||||
"./build/src/core/interfaces/i_selectable_toolbox_item.js",
|
||||
"./build/src/core/interfaces/i_registrable.js",
|
||||
"./build/src/core/interfaces/i_registrable_field.js",
|
||||
"./build/src/core/interfaces/i_positionable.js",
|
||||
"./build/src/core/interfaces/i_movable.js",
|
||||
"./build/src/core/utils/metrics.js",
|
||||
"./build/src/core/interfaces/i_metrics_manager.js",
|
||||
"./build/src/core/interfaces/i_keyboard_accessible.js",
|
||||
"./build/src/core/interfaces/i_flyout.js",
|
||||
"./build/src/core/interfaces/i_drag_target.js",
|
||||
"./build/src/core/interfaces/i_draggable.js",
|
||||
"./build/src/core/interfaces/i_delete_area.js",
|
||||
"./build/src/core/interfaces/i_deletable.js",
|
||||
"./build/src/core/interfaces/i_copyable.js",
|
||||
"./build/src/core/interfaces/i_contextmenu.js",
|
||||
"./build/src/core/interfaces/i_connection_checker.js",
|
||||
"./build/src/core/interfaces/i_component.js",
|
||||
"./build/src/core/interfaces/i_toolbox_item.js",
|
||||
"./build/src/core/interfaces/i_collapsible_toolbox_item.js",
|
||||
"./build/src/core/interfaces/i_bubble.js",
|
||||
"./build/src/core/interfaces/i_bounded_element.js",
|
||||
"./build/src/core/interfaces/i_block_dragger.js",
|
||||
"./build/src/core/interfaces/i_autohideable.js",
|
||||
"./build/src/core/interfaces/i_ast_node_location.js",
|
||||
"./build/src/core/interfaces/i_ast_node_location_with_block.js",
|
||||
"./build/src/core/interfaces/i_ast_node_location_svg.js",
|
||||
"./build/src/core/flyout_horizontal.js",
|
||||
"./build/src/core/generator.js",
|
||||
"./build/src/core/scrollbar_pair.js",
|
||||
"./build/src/core/flyout_base.js",
|
||||
"./build/src/core/flyout_metrics_manager.js",
|
||||
"./build/src/core/flyout_button.js",
|
||||
"./build/src/core/field_variable.js",
|
||||
"./build/src/core/field_number.js",
|
||||
"./build/src/core/field_multilineinput.js",
|
||||
@@ -25,6 +57,20 @@
|
||||
"./build/src/core/field_checkbox.js",
|
||||
"./build/src/core/field_angle.js",
|
||||
"./build/src/core/toolbox/collapsible_category.js",
|
||||
"./build/src/core/blockly_options.js",
|
||||
"./build/src/core/block_drag_surface.js",
|
||||
"./build/src/core/renderers/zelos/renderer.js",
|
||||
"./build/src/core/renderers/zelos/path_object.js",
|
||||
"./build/src/core/renderers/zelos/marker_svg.js",
|
||||
"./build/src/core/renderers/zelos/measurables/top_row.js",
|
||||
"./build/src/core/renderers/zelos/measurables/row_elements.js",
|
||||
"./build/src/core/renderers/zelos/measurables/inputs.js",
|
||||
"./build/src/core/renderers/zelos/measurables/bottom_row.js",
|
||||
"./build/src/core/field_textinput.js",
|
||||
"./build/src/core/field_image.js",
|
||||
"./build/src/core/renderers/zelos/info.js",
|
||||
"./build/src/core/renderers/zelos/drawer.js",
|
||||
"./build/src/core/renderers/zelos/constants.js",
|
||||
"./build/src/core/renderers/zelos/zelos.js",
|
||||
"./build/src/core/renderers/thrasos/renderer.js",
|
||||
"./build/src/core/renderers/thrasos/info.js",
|
||||
@@ -36,12 +82,12 @@
|
||||
"./build/src/core/renderers/minimalist/drawer.js",
|
||||
"./build/src/core/renderers/minimalist/constants.js",
|
||||
"./build/src/core/renderers/minimalist/minimalist.js",
|
||||
"./build/src/core/renderers/geras/measurables/statement_input.js",
|
||||
"./build/src/core/renderers/geras/path_object.js",
|
||||
"./build/src/core/renderers/geras/renderer.js",
|
||||
"./build/src/core/renderers/geras/info.js",
|
||||
"./build/src/core/renderers/geras/measurables/statement_input.js",
|
||||
"./build/src/core/renderers/geras/measurables/inline_input.js",
|
||||
"./build/src/core/renderers/geras/info.js",
|
||||
"./build/src/core/renderers/geras/highlight_constants.js",
|
||||
"./build/src/core/renderers/geras/renderer.js",
|
||||
"./build/src/core/renderers/geras/highlighter.js",
|
||||
"./build/src/core/renderers/geras/drawer.js",
|
||||
"./build/src/core/renderers/geras/constants.js",
|
||||
@@ -49,224 +95,177 @@
|
||||
"./build/src/core/theme/zelos.js",
|
||||
"./build/src/core/theme/themes.js",
|
||||
"./build/src/core/shortcut_items.js",
|
||||
"./build/src/core/events/workspace_events.js",
|
||||
"./build/src/core/events/events_block_move.js",
|
||||
"./build/src/core/events/events_comment_move.js",
|
||||
"./build/src/core/events/events_toolbox_item_select.js",
|
||||
"./build/src/core/events/events_ui.js",
|
||||
"./build/src/core/events/workspace_events.js",
|
||||
"./build/src/core/events/events.js",
|
||||
"./build/src/core/contextmenu_items.js",
|
||||
"./build/src/core/widgetdiv.js",
|
||||
"./build/src/core/clipboard.js",
|
||||
"./build/src/core/contextmenu.js",
|
||||
"./build/src/closure/goog/goog.js",
|
||||
"./build/src/core/touch.js",
|
||||
"./build/src/core/utils/useragent.js",
|
||||
"./build/src/core/utils/svg.js",
|
||||
"./build/src/core/utils/dom.js",
|
||||
"./build/src/core/browser_events.js",
|
||||
"./build/src/core/clipboard.js",
|
||||
"./build/src/core/config.js",
|
||||
"./build/src/core/registry.js",
|
||||
"./build/src/core/utils/idgenerator.js",
|
||||
"./build/src/core/connection_checker.js",
|
||||
"./build/src/core/toolbox/separator.js",
|
||||
"./build/src/core/toolbox/toolbox_item.js",
|
||||
"./build/src/core/interfaces/i_selectable_toolbox_item.js",
|
||||
"./build/src/core/interfaces/i_collapsible_toolbox_item.js",
|
||||
"./build/src/core/toolbox/category.js",
|
||||
"./build/src/core/serialization/exceptions.js",
|
||||
"./build/src/core/interfaces/i_serializer.js",
|
||||
"./build/src/core/events/utils.js",
|
||||
"./build/src/core/contextmenu.js",
|
||||
"./build/src/core/events/events_var_rename.js",
|
||||
"./build/src/core/events/events_var_delete.js",
|
||||
"./build/src/core/variable_map.js",
|
||||
"./build/src/core/serialization/registry.js",
|
||||
"./build/src/core/serialization/priorities.js",
|
||||
"./build/src/core/serialization/exceptions.js",
|
||||
"./build/src/core/utils/size.js",
|
||||
"./build/src/core/serialization/blocks.js",
|
||||
"./build/src/core/utils/toolbox.js",
|
||||
"./build/src/core/utils/math.js",
|
||||
"./build/src/core/utils/array.js",
|
||||
"./build/src/core/constants.js",
|
||||
"./build/src/core/connection.js",
|
||||
"./build/src/core/connection_checker.js",
|
||||
"./build/src/core/workspace.js",
|
||||
"./build/src/core/menu.js",
|
||||
"./build/src/core/menuitem.js",
|
||||
"./build/src/core/keyboard_nav/basic_cursor.js",
|
||||
"./build/src/core/keyboard_nav/tab_navigate_cursor.js",
|
||||
"./build/src/core/mutator.js",
|
||||
"./build/src/core/warning.js",
|
||||
"./build/src/core/comment.js",
|
||||
"./build/src/core/events/events_block_drag.js",
|
||||
"./build/src/core/events/events_block_move.js",
|
||||
"./build/src/core/bump_objects.js",
|
||||
"./build/src/core/block_dragger.js",
|
||||
"./build/src/core/workspace_dragger.js",
|
||||
"./build/src/core/interfaces/i_block_dragger.js",
|
||||
"./build/src/core/events/events_viewport.js",
|
||||
"./build/src/core/events/events_theme_change.js",
|
||||
"./build/src/core/events/events_block_create.js",
|
||||
"./build/src/core/events/events_click.js",
|
||||
"./build/src/core/zoom_controls.js",
|
||||
"./build/src/core/workspace_drag_surface_svg.js",
|
||||
"./build/src/core/events/events_selected.js",
|
||||
"./build/src/core/events/events_comment_delete.js",
|
||||
"./build/src/core/events/events_comment_change.js",
|
||||
"./build/src/core/workspace_comment.js",
|
||||
"./build/src/core/events/events_comment_create.js",
|
||||
"./build/src/core/events/events_comment_base.js",
|
||||
"./build/src/core/events/events_comment_move.js",
|
||||
"./build/src/core/workspace_comment_svg.js",
|
||||
"./build/src/core/menu.js",
|
||||
"./build/src/core/field_dropdown.js",
|
||||
"./build/src/core/workspace_audio.js",
|
||||
"./build/src/core/events/events_trashcan_open.js",
|
||||
"./build/src/core/sprites.js",
|
||||
"./build/src/core/utils.js",
|
||||
"./build/src/core/drag_target.js",
|
||||
"./build/src/core/delete_area.js",
|
||||
"./build/src/core/events/events_block_delete.js",
|
||||
"./build/src/core/positionable_helpers.js",
|
||||
"./build/src/core/events/events_trashcan_open.js",
|
||||
"./build/src/core/trashcan.js",
|
||||
"./build/src/core/touch_gesture.js",
|
||||
"./build/src/core/theme_manager.js",
|
||||
"./build/src/core/scrollbar_pair.js",
|
||||
"./build/src/core/options.js",
|
||||
"./build/src/core/interfaces/i_movable.js",
|
||||
"./build/src/core/interfaces/i_selectable.js",
|
||||
"./build/src/core/interfaces/i_copyable.js",
|
||||
"./build/src/core/interfaces/i_bounded_element.js",
|
||||
"./build/src/core/grid.js",
|
||||
"./build/src/core/css.js",
|
||||
"./build/src/core/flyout_button.js",
|
||||
"./build/src/core/contextmenu_registry.js",
|
||||
"./build/src/core/theme/classic.js",
|
||||
"./build/src/core/blockly_options.js",
|
||||
"./build/src/core/utils.js",
|
||||
"./build/src/core/renderers/zelos/measurables/top_row.js",
|
||||
"./build/src/core/renderers/zelos/measurables/row_elements.js",
|
||||
"./build/src/core/renderers/zelos/marker_svg.js",
|
||||
"./build/src/core/renderers/zelos/measurables/inputs.js",
|
||||
"./build/src/core/renderers/zelos/drawer.js",
|
||||
"./build/src/core/renderers/zelos/renderer.js",
|
||||
"./build/src/core/renderers/zelos/path_object.js",
|
||||
"./build/src/core/field_textinput.js",
|
||||
"./build/src/core/field_image.js",
|
||||
"./build/src/core/renderers/zelos/constants.js",
|
||||
"./build/src/core/renderers/zelos/measurables/bottom_row.js",
|
||||
"./build/src/core/renderers/zelos/info.js",
|
||||
"./build/src/core/renderers/common/renderer.js",
|
||||
"./build/src/core/renderers/common/path_object.js",
|
||||
"./build/src/core/events/events_marker_move.js",
|
||||
"./build/src/core/renderers/common/marker_svg.js",
|
||||
"./build/src/core/input.js",
|
||||
"./build/src/core/renderers/common/info.js",
|
||||
"./build/src/core/renderers/common/drawer.js",
|
||||
"./build/src/core/renderers/common/debugger.js",
|
||||
"./build/src/core/renderers/common/debug.js",
|
||||
"./build/src/core/renderers/common/constants.js",
|
||||
"./build/src/core/renderers/measurables/top_row.js",
|
||||
"./build/src/core/renderers/measurables/square_corner.js",
|
||||
"./build/src/core/renderers/measurables/spacer_row.js",
|
||||
"./build/src/core/renderers/measurables/round_corner.js",
|
||||
"./build/src/core/renderers/common/path_object.js",
|
||||
"./build/src/core/interfaces/i_positionable.js",
|
||||
"./build/src/core/interfaces/i_drag_target.js",
|
||||
"./build/src/core/interfaces/i_delete_area.js",
|
||||
"./build/src/core/interfaces/i_component.js",
|
||||
"./build/src/core/interfaces/i_autohideable.js",
|
||||
"./build/src/core/component_manager.js",
|
||||
"./build/src/core/insertion_marker_manager.js",
|
||||
"./build/src/core/renderers/common/i_path_object.js",
|
||||
"./build/src/core/renderers/common/drawer.js",
|
||||
"./build/src/core/renderers/common/renderer.js",
|
||||
"./build/src/core/renderers/measurables/previous_connection.js",
|
||||
"./build/src/core/renderers/measurables/output_connection.js",
|
||||
"./build/src/core/renderers/measurables/next_connection.js",
|
||||
"./build/src/core/renderers/measurables/jagged_edge.js",
|
||||
"./build/src/core/renderers/measurables/statement_input.js",
|
||||
"./build/src/core/renderers/measurables/input_row.js",
|
||||
"./build/src/core/renderers/measurables/inline_input.js",
|
||||
"./build/src/core/scrollbar.js",
|
||||
"./build/src/core/interfaces/i_toolbox_item.js",
|
||||
"./build/src/core/interfaces/i_toolbox.js",
|
||||
"./build/src/core/utils/metrics.js",
|
||||
"./build/src/core/interfaces/i_metrics_manager.js",
|
||||
"./build/src/core/interfaces/i_flyout.js",
|
||||
"./build/src/core/metrics_manager.js",
|
||||
"./build/src/core/interfaces/i_deletable.js",
|
||||
"./build/src/core/interfaces/i_draggable.js",
|
||||
"./build/src/core/interfaces/i_contextmenu.js",
|
||||
"./build/src/core/interfaces/i_bubble.js",
|
||||
"./build/src/core/block_drag_surface.js",
|
||||
"./build/src/core/bubble.js",
|
||||
"./build/src/core/icon.js",
|
||||
"./build/src/core/renderers/measurables/in_row_spacer.js",
|
||||
"./build/src/core/renderers/measurables/icon.js",
|
||||
"./build/src/core/renderers/measurables/hat.js",
|
||||
"./build/src/core/renderers/measurables/external_value_input.js",
|
||||
"./build/src/core/renderers/common/info.js",
|
||||
"./build/src/core/renderers/measurables/field.js",
|
||||
"./build/src/core/renderers/common/debugger.js",
|
||||
"./build/src/core/renderers/measurables/input_connection.js",
|
||||
"./build/src/core/renderers/measurables/in_row_spacer.js",
|
||||
"./build/src/core/renderers/measurables/external_value_input.js",
|
||||
"./build/src/core/renderers/measurables/connection.js",
|
||||
"./build/src/core/renderers/measurables/row.js",
|
||||
"./build/src/core/renderers/measurables/bottom_row.js",
|
||||
"./build/src/core/renderers/measurables/types.js",
|
||||
"./build/src/core/renderers/measurables/base.js",
|
||||
"./build/src/core/renderers/measurables/connection.js",
|
||||
"./build/src/core/renderers/measurables/next_connection.js",
|
||||
"./build/src/core/renderers/measurables/bottom_row.js",
|
||||
"./build/src/core/renderers/common/debug.js",
|
||||
"./build/src/core/renderers/common/block_rendering.js",
|
||||
"./build/src/core/variables_dynamic.js",
|
||||
"./build/src/core/events/events_var_rename.js",
|
||||
"./build/src/core/events/events_var_delete.js",
|
||||
"./build/src/core/variable_map.js",
|
||||
"./build/src/core/names.js",
|
||||
"./build/src/core/events/events_block_base.js",
|
||||
"./build/src/core/events/events_block_change.js",
|
||||
"./build/src/core/events/events_marker_move.js",
|
||||
"./build/src/core/renderers/common/marker_svg.js",
|
||||
"./build/src/core/grid.js",
|
||||
"./build/src/core/connection_db.js",
|
||||
"./build/src/core/warning.js",
|
||||
"./build/src/core/keyboard_nav/marker.js",
|
||||
"./build/src/core/keyboard_nav/ast_node.js",
|
||||
"./build/src/core/keyboard_nav/cursor.js",
|
||||
"./build/src/core/marker_manager.js",
|
||||
"./build/src/core/utils/sentinel.js",
|
||||
"./build/src/core/field_label.js",
|
||||
"./build/src/core/input_types.js",
|
||||
"./build/src/core/interfaces/i_registrable_field.js",
|
||||
"./build/src/core/keyboard_nav/basic_cursor.js",
|
||||
"./build/src/core/keyboard_nav/tab_navigate_cursor.js",
|
||||
"./build/src/core/keyboard_nav/ast_node.js",
|
||||
"./build/src/core/field_registry.js",
|
||||
"./build/src/core/input.js",
|
||||
"./build/src/core/interfaces/i_registrable.js",
|
||||
"./build/src/core/widgetdiv.js",
|
||||
"./build/src/core/utils/sentinel.js",
|
||||
"./build/src/core/marker_manager.js",
|
||||
"./build/src/core/dropdowndiv.js",
|
||||
"./build/src/core/workspace_dragger.js",
|
||||
"./build/src/core/tooltip.js",
|
||||
"./build/src/core/events/events_comment_change.js",
|
||||
"./build/src/core/workspace_comment.js",
|
||||
"./build/src/core/events/events_comment_delete.js",
|
||||
"./build/src/core/events/events_comment_base.js",
|
||||
"./build/src/core/events/events_comment_create.js",
|
||||
"./build/src/core/workspace_comment_svg.js",
|
||||
"./build/src/core/bubble_dragger.js",
|
||||
"./build/src/core/insertion_marker_manager.js",
|
||||
"./build/src/core/bump_objects.js",
|
||||
"./build/src/core/events/events_block_drag.js",
|
||||
"./build/src/core/block_dragger.js",
|
||||
"./build/src/core/gesture.js",
|
||||
"./build/src/core/utils/keycodes.js",
|
||||
"./build/src/core/shortcut_registry.js",
|
||||
"./build/src/core/interfaces/i_keyboard_accessible.js",
|
||||
"./build/src/core/interfaces/i_ast_node_location_with_block.js",
|
||||
"./build/src/core/interfaces/i_ast_node_location.js",
|
||||
"./build/src/core/interfaces/i_ast_node_location_svg.js",
|
||||
"./build/src/core/theme.js",
|
||||
"./build/src/core/constants.js",
|
||||
"./build/src/core/interfaces/i_connection_checker.js",
|
||||
"./build/src/core/connection_db.js",
|
||||
"./build/src/core/config.js",
|
||||
"./build/src/core/rendered_connection.js",
|
||||
"./build/src/core/utils/svg_paths.js",
|
||||
"./build/src/core/renderers/common/constants.js",
|
||||
"./build/src/core/field.js",
|
||||
"./build/src/core/events/events_ui_base.js",
|
||||
"./build/src/core/events/events_bubble_open.js",
|
||||
"./build/src/core/field_label.js",
|
||||
"./build/src/core/contextmenu_registry.js",
|
||||
"./build/src/core/block_animations.js",
|
||||
"./build/src/core/events/events_selected.js",
|
||||
"./build/src/core/block_svg.js",
|
||||
"./build/src/core/events/events_viewport.js",
|
||||
"./build/src/core/events/events_theme_change.js",
|
||||
"./build/src/core/sprites.js",
|
||||
"./build/src/core/positionable_helpers.js",
|
||||
"./build/src/core/utils/array.js",
|
||||
"./build/src/core/component_manager.js",
|
||||
"./build/src/core/events/events_click.js",
|
||||
"./build/src/core/zoom_controls.js",
|
||||
"./build/src/core/utils/svg_paths.js",
|
||||
"./build/src/core/internal_constants.js",
|
||||
"./build/src/core/rendered_connection.js",
|
||||
"./build/src/core/variables_dynamic.js",
|
||||
"./build/src/core/names.js",
|
||||
"./build/src/core/procedures.js",
|
||||
"./build/src/core/workspace_svg.js",
|
||||
"./build/src/core/utils/svg_math.js",
|
||||
"./build/src/core/bubble_dragger.js",
|
||||
"./build/src/core/connection_type.js",
|
||||
"./build/src/core/internal_constants.js",
|
||||
"./build/src/core/block_animations.js",
|
||||
"./build/src/core/gesture.js",
|
||||
"./build/src/core/touch.js",
|
||||
"./build/src/core/browser_events.js",
|
||||
"./build/src/core/tooltip.js",
|
||||
"./build/src/core/block_svg.js",
|
||||
"./build/src/core/utils/size.js",
|
||||
"./build/src/core/utils/rect.js",
|
||||
"./build/src/core/utils/coordinate.js",
|
||||
"./build/src/core/theme/classic.js",
|
||||
"./build/src/core/theme.js",
|
||||
"./build/src/core/options.js",
|
||||
"./build/src/core/icon.js",
|
||||
"./build/src/core/utils/math.js",
|
||||
"./build/src/core/utils/style.js",
|
||||
"./build/src/core/dropdowndiv.js",
|
||||
"./build/src/core/utils/aria.js",
|
||||
"./build/src/core/field_dropdown.js",
|
||||
"./build/src/core/utils/rect.js",
|
||||
"./build/src/core/utils/svg_math.js",
|
||||
"./build/src/core/utils/svg.js",
|
||||
"./build/src/core/utils/coordinate.js",
|
||||
"./build/src/core/scrollbar.js",
|
||||
"./build/src/core/toolbox/separator.js",
|
||||
"./build/src/core/toolbox/toolbox_item.js",
|
||||
"./build/src/core/msg.js",
|
||||
"./build/src/core/utils/colour.js",
|
||||
"./build/src/core/utils/parsing.js",
|
||||
"./build/src/core/extensions.js",
|
||||
"./build/src/core/block.js",
|
||||
"./build/src/closure/goog/goog.js",
|
||||
"./build/src/core/utils/dom.js",
|
||||
"./build/src/core/utils/colour.js",
|
||||
"./build/src/core/utils/aria.js",
|
||||
"./build/src/core/utils/deprecation.js",
|
||||
"./build/src/core/utils/string.js",
|
||||
"./build/src/core/css.js",
|
||||
"./build/src/core/toolbox/category.js",
|
||||
"./build/src/core/utils/toolbox.js",
|
||||
"./build/src/core/metrics_manager.js",
|
||||
"./build/src/core/bubble.js",
|
||||
"./build/src/core/events/events_ui_base.js",
|
||||
"./build/src/core/events/events_bubble_open.js",
|
||||
"./build/src/core/mutator.js",
|
||||
"./build/src/core/extensions.js",
|
||||
"./build/src/core/events/events_block_delete.js",
|
||||
"./build/src/core/events/events_block_create.js",
|
||||
"./build/src/core/events/events_abstract.js",
|
||||
"./build/src/core/events/events_block_base.js",
|
||||
"./build/src/core/events/events_block_change.js",
|
||||
"./build/src/core/block.js",
|
||||
"./build/src/core/utils/object.js",
|
||||
"./build/src/core/dialog.js",
|
||||
"./build/src/core/utils/xml.js",
|
||||
"./build/src/core/events/events_var_base.js",
|
||||
"./build/src/core/events/events_var_create.js",
|
||||
"./build/src/core/variable_model.js",
|
||||
"./build/src/core/variables.js",
|
||||
"./build/src/core/utils/object.js",
|
||||
"./build/src/core/events/events_abstract.js",
|
||||
"./build/src/core/registry.js",
|
||||
"./build/src/core/events/utils.js",
|
||||
"./build/src/core/utils/string.js",
|
||||
"./build/src/core/comment.js",
|
||||
"./build/src/core/xml.js",
|
||||
"./build/src/core/connection.js",
|
||||
"./build/src/core/common.js",
|
||||
"./build/src/core/utils/xml.js",
|
||||
"./build/src/core/input_types.js",
|
||||
"./build/src/core/connection_type.js",
|
||||
"./build/src/core/blocks.js",
|
||||
"./build/src/core/common.js",
|
||||
"./build/src/closure/goog/base_minimal.js",
|
||||
"./build/src/core/blockly.js",
|
||||
"./blocks/variables_dynamic.js",
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
"core/**/*", // N.B.: also pulls in closure/goog/goog.js if needed.
|
||||
"closure/**/*", // Just for ouptut directory structure.
|
||||
],
|
||||
"exclude": [
|
||||
"core/blockly.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
// Tells TypeScript to read JS files, as
|
||||
// normally they are ignored as source files
|
||||
|
||||
Reference in New Issue
Block a user