diff --git a/core/block.js b/core/block.js index 2f816215428..a165476d062 100644 --- a/core/block.js +++ b/core/block.js @@ -15,8 +15,6 @@ */ goog.module('Blockly.Block'); -/* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); const Extensions = goog.require('Blockly.Extensions'); const Tooltip = goog.require('Blockly.Tooltip'); const arrayUtils = goog.require('Blockly.utils.array'); @@ -27,6 +25,8 @@ const fieldRegistry = goog.require('Blockly.fieldRegistry'); const idGenerator = goog.require('Blockly.utils.idGenerator'); const object = goog.require('Blockly.utils.object'); const parsing = goog.require('Blockly.utils.parsing'); +/* eslint-disable-next-line no-unused-vars */ +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); const {Align, Input} = goog.require('Blockly.Input'); const {ASTNode} = goog.require('Blockly.ASTNode'); const {Blocks} = goog.require('Blockly.blocks'); diff --git a/core/bump_objects.js b/core/bump_objects.js index 2b7dc82a7f4..3cff5ed51b8 100644 --- a/core/bump_objects.js +++ b/core/bump_objects.js @@ -15,11 +15,11 @@ */ goog.module('Blockly.bumpObjects'); -/* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); const eventUtils = goog.require('Blockly.Events.utils'); const mathUtils = goog.require('Blockly.utils.math'); /* eslint-disable-next-line no-unused-vars */ +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); +/* eslint-disable-next-line no-unused-vars */ const {BlockSvg} = goog.requireType('Blockly.BlockSvg'); /* eslint-disable-next-line no-unused-vars */ const {IBoundedElement} = goog.requireType('Blockly.IBoundedElement'); diff --git a/core/events/events.js b/core/events/events.js index d4cb5f7d49d..e6e1ef5b493 100644 --- a/core/events/events.js +++ b/core/events/events.js @@ -15,9 +15,9 @@ */ goog.module('Blockly.Events'); -const Abstract = goog.require('Blockly.Events.Abstract'); const deprecation = goog.require('Blockly.utils.deprecation'); const eventUtils = goog.require('Blockly.Events.utils'); +const {Abstract} = goog.require('Blockly.Events.Abstract'); const {BlockBase} = goog.require('Blockly.Events.BlockBase'); const {BlockChange} = goog.require('Blockly.Events.BlockChange'); const {BlockCreate} = goog.require('Blockly.Events.BlockCreate'); diff --git a/core/events/events_abstract.js b/core/events/events_abstract.js index c20d894db6b..627c1fe9861 100644 --- a/core/events/events_abstract.js +++ b/core/events/events_abstract.js @@ -118,4 +118,4 @@ Abstract.prototype.getEventWorkspace_ = function() { return workspace; }; -exports = Abstract; +exports.Abstract = Abstract; diff --git a/core/events/events_block_base.js b/core/events/events_block_base.js index c243575fa29..3a0842def95 100644 --- a/core/events/events_block_base.js +++ b/core/events/events_block_base.js @@ -15,8 +15,8 @@ */ goog.module('Blockly.Events.BlockBase'); -const Abstract = goog.require('Blockly.Events.Abstract'); const object = goog.require('Blockly.utils.object'); +const {Abstract} = goog.require('Blockly.Events.Abstract'); /* eslint-disable-next-line no-unused-vars */ const {Block} = goog.requireType('Blockly.Block'); diff --git a/core/events/events_comment_base.js b/core/events/events_comment_base.js index 63de88dfe84..a54e8e0e87d 100644 --- a/core/events/events_comment_base.js +++ b/core/events/events_comment_base.js @@ -15,11 +15,11 @@ */ goog.module('Blockly.Events.CommentBase'); -const AbstractEvents = goog.require('Blockly.Events.Abstract'); const Xml = goog.require('Blockly.Xml'); const eventUtils = goog.require('Blockly.Events.utils'); const object = goog.require('Blockly.utils.object'); const utilsXml = goog.require('Blockly.utils.xml'); +const {Abstract} = goog.require('Blockly.Events.Abstract'); /* eslint-disable-next-line no-unused-vars */ const {CommentCreate} = goog.requireType('Blockly.Events.CommentCreate'); /* eslint-disable-next-line no-unused-vars */ @@ -32,7 +32,7 @@ const {WorkspaceComment} = goog.requireType('Blockly.WorkspaceComment'); * Abstract class for a comment event. * @param {!WorkspaceComment=} opt_comment The comment this event * corresponds to. Undefined for a blank event. - * @extends {AbstractEvents} + * @extends {Abstract} * @constructor * @alias Blockly.Events.CommentBase */ @@ -69,7 +69,7 @@ const CommentBase = function(opt_comment) { */ this.recordUndo = eventUtils.getRecordUndo(); }; -object.inherits(CommentBase, AbstractEvents); +object.inherits(CommentBase, Abstract); /** * Encode the event as JSON. diff --git a/core/events/events_ui_base.js b/core/events/events_ui_base.js index cd7ad1d2e20..8f963f1757b 100644 --- a/core/events/events_ui_base.js +++ b/core/events/events_ui_base.js @@ -17,8 +17,8 @@ */ goog.module('Blockly.Events.UiBase'); -const Abstract = goog.require('Blockly.Events.Abstract'); const object = goog.require('Blockly.utils.object'); +const {Abstract} = goog.require('Blockly.Events.Abstract'); /** diff --git a/core/events/events_var_base.js b/core/events/events_var_base.js index fd919a061bb..2f72cd9828d 100644 --- a/core/events/events_var_base.js +++ b/core/events/events_var_base.js @@ -15,8 +15,8 @@ */ goog.module('Blockly.Events.VarBase'); -const Abstract = goog.require('Blockly.Events.Abstract'); const object = goog.require('Blockly.utils.object'); +const {Abstract} = goog.require('Blockly.Events.Abstract'); /* eslint-disable-next-line no-unused-vars */ const {VariableModel} = goog.requireType('Blockly.VariableModel'); diff --git a/core/events/utils.js b/core/events/utils.js index c405490b7bd..9f1c5c229e0 100644 --- a/core/events/utils.js +++ b/core/events/utils.js @@ -17,11 +17,11 @@ */ goog.module('Blockly.Events.utils'); -/* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); const idGenerator = goog.require('Blockly.utils.idGenerator'); const registry = goog.require('Blockly.registry'); /* eslint-disable-next-line no-unused-vars */ +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); +/* eslint-disable-next-line no-unused-vars */ const {BlockCreate} = goog.requireType('Blockly.Events.BlockCreate'); /* eslint-disable-next-line no-unused-vars */ const {BlockMove} = goog.requireType('Blockly.Events.BlockMove'); diff --git a/core/events/workspace_events.js b/core/events/workspace_events.js index 726a114c079..d240f3d93e9 100644 --- a/core/events/workspace_events.js +++ b/core/events/workspace_events.js @@ -15,10 +15,10 @@ */ goog.module('Blockly.Events.FinishedLoading'); -const Abstract = goog.require('Blockly.Events.Abstract'); const eventUtils = goog.require('Blockly.Events.utils'); const object = goog.require('Blockly.utils.object'); const registry = goog.require('Blockly.registry'); +const {Abstract} = goog.require('Blockly.Events.Abstract'); /* eslint-disable-next-line no-unused-vars */ const {Workspace} = goog.requireType('Blockly.Workspace'); diff --git a/core/mutator.js b/core/mutator.js index 97adf1b43df..34e42b71fda 100644 --- a/core/mutator.js +++ b/core/mutator.js @@ -17,13 +17,13 @@ */ goog.module('Blockly.Mutator'); -/* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); const dom = goog.require('Blockly.utils.dom'); const eventUtils = goog.require('Blockly.Events.utils'); const internalConstants = goog.require('Blockly.internalConstants'); const toolbox = goog.require('Blockly.utils.toolbox'); const xml = goog.require('Blockly.utils.xml'); +/* eslint-disable-next-line no-unused-vars */ +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); const {BlockChange} = goog.require('Blockly.Events.BlockChange'); /* eslint-disable-next-line no-unused-vars */ const {BlockSvg} = goog.requireType('Blockly.BlockSvg'); diff --git a/core/procedures.js b/core/procedures.js index a6c819f5995..ab6b9125c39 100644 --- a/core/procedures.js +++ b/core/procedures.js @@ -15,12 +15,12 @@ */ goog.module('Blockly.Procedures'); -/* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); const Variables = goog.require('Blockly.Variables'); const Xml = goog.require('Blockly.Xml'); const eventUtils = goog.require('Blockly.Events.utils'); const utilsXml = goog.require('Blockly.utils.xml'); +/* eslint-disable-next-line no-unused-vars */ +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); const {Blocks} = goog.require('Blockly.blocks'); /* eslint-disable-next-line no-unused-vars */ const {Block} = goog.requireType('Blockly.Block'); diff --git a/core/registry.js b/core/registry.js index b2420f86aa9..4b80d2560d5 100644 --- a/core/registry.js +++ b/core/registry.js @@ -18,7 +18,7 @@ goog.module('Blockly.registry'); /* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); /* eslint-disable-next-line no-unused-vars */ const {Cursor} = goog.requireType('Blockly.Cursor'); /* eslint-disable-next-line no-unused-vars */ diff --git a/core/trashcan.js b/core/trashcan.js index 3b7dbafc86f..e9a8a48196e 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -15,8 +15,6 @@ */ goog.module('Blockly.Trashcan'); -/* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); /* eslint-disable-next-line no-unused-vars */ const blocks = goog.requireType('Blockly.serialization.blocks'); const browserEvents = goog.require('Blockly.browserEvents'); @@ -27,6 +25,8 @@ const registry = goog.require('Blockly.registry'); const toolbox = goog.require('Blockly.utils.toolbox'); const uiPosition = goog.require('Blockly.uiPosition'); /* eslint-disable-next-line no-unused-vars */ +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); +/* eslint-disable-next-line no-unused-vars */ const {BlocklyOptions} = goog.requireType('Blockly.BlocklyOptions'); const {ComponentManager} = goog.require('Blockly.ComponentManager'); const {DeleteArea} = goog.require('Blockly.DeleteArea'); diff --git a/core/workspace.js b/core/workspace.js index 3a4af4359dc..51995a75784 100644 --- a/core/workspace.js +++ b/core/workspace.js @@ -15,8 +15,6 @@ */ goog.module('Blockly.Workspace'); -/* eslint-disable-next-line no-unused-vars */ -const Abstract = goog.requireType('Blockly.Events.Abstract'); const arrayUtils = goog.require('Blockly.utils.array'); const eventUtils = goog.require('Blockly.Events.utils'); const idGenerator = goog.require('Blockly.utils.idGenerator'); @@ -25,6 +23,8 @@ const registry = goog.require('Blockly.registry'); /* eslint-disable-next-line no-unused-vars */ const toolbox = goog.requireType('Blockly.utils.toolbox'); /* eslint-disable-next-line no-unused-vars */ +const {Abstract} = goog.requireType('Blockly.Events.Abstract'); +/* eslint-disable-next-line no-unused-vars */ const {BlocklyOptions} = goog.requireType('Blockly.BlocklyOptions'); /* eslint-disable-next-line no-unused-vars */ const {Block} = goog.requireType('Blockly.Block'); diff --git a/scripts/gulpfiles/chunks.json b/scripts/gulpfiles/chunks.json index 4f9b9449267..c034a0d896a 100644 --- a/scripts/gulpfiles/chunks.json +++ b/scripts/gulpfiles/chunks.json @@ -26,18 +26,6 @@ "./core/field_checkbox.js", "./core/field_angle.js", "./core/toolbox/collapsible_category.js", - "./core/renderers/zelos/measurables/top_row.js", - "./core/renderers/zelos/measurables/inputs.js", - "./core/renderers/zelos/measurables/row_elements.js", - "./core/renderers/zelos/marker_svg.js", - "./core/renderers/zelos/renderer.js", - "./core/field_textinput.js", - "./core/field_image.js", - "./core/renderers/zelos/info.js", - "./core/renderers/zelos/path_object.js", - "./core/renderers/zelos/drawer.js", - "./core/renderers/zelos/constants.js", - "./core/renderers/zelos/measurables/bottom_row.js", "./core/renderers/zelos/zelos.js", "./core/renderers/thrasos/renderer.js", "./core/renderers/thrasos/info.js", @@ -76,18 +64,23 @@ "./core/utils/useragent.js", "./core/utils/svg.js", "./core/utils/dom.js", + "./core/utils/idgenerator.js", "./core/connection_checker.js", - "./core/keyboard_nav/ast_node.js", - "./core/keyboard_nav/cursor.js", - "./core/registry.js", + "./core/toolbox/separator.js", + "./core/toolbox/toolbox_item.js", + "./core/interfaces/i_selectable_toolbox_item.js", + "./core/interfaces/i_collapsible_toolbox_item.js", + "./core/toolbox/category.js", + "./core/serialization/exceptions.js", + "./core/interfaces/i_serializer.js", + "./core/serialization/registry.js", + "./core/serialization/priorities.js", + "./core/serialization/blocks.js", + "./core/utils/toolbox.js", "./core/utils/math.js", - "./core/utils/idgenerator.js", "./core/utils/array.js", "./core/workspace.js", - "./core/utils/object.js", "./core/events/events_block_delete.js", - "./core/toolbox/separator.js", - "./core/toolbox/toolbox_item.js", "./core/keyboard_nav/basic_cursor.js", "./core/keyboard_nav/tab_navigate_cursor.js", "./core/warning.js", @@ -128,11 +121,25 @@ "./core/options.js", "./core/interfaces/i_bounded_element.js", "./core/grid.js", + "./core/css.js", "./core/flyout_button.js", "./core/contextmenu_registry.js", "./core/theme/classic.js", "./core/blockly_options.js", "./core/utils.js", + "./core/renderers/zelos/measurables/top_row.js", + "./core/renderers/zelos/measurables/row_elements.js", + "./core/renderers/zelos/marker_svg.js", + "./core/renderers/zelos/measurables/inputs.js", + "./core/renderers/zelos/path_object.js", + "./core/renderers/zelos/drawer.js", + "./core/renderers/zelos/renderer.js", + "./core/utils/aria.js", + "./core/field_textinput.js", + "./core/field_image.js", + "./core/renderers/zelos/constants.js", + "./core/renderers/zelos/measurables/bottom_row.js", + "./core/renderers/zelos/info.js", "./core/renderers/measurables/top_row.js", "./core/renderers/measurables/statement_input.js", "./core/renderers/measurables/square_corner.js", @@ -155,8 +162,11 @@ "./core/renderers/measurables/input_row.js", "./core/renderers/measurables/inline_input.js", "./core/scrollbar.js", + "./core/interfaces/i_toolbox_item.js", + "./core/interfaces/i_toolbox.js", "./core/utils/metrics.js", "./core/interfaces/i_metrics_manager.js", + "./core/interfaces/i_flyout.js", "./core/metrics_manager.js", "./core/interfaces/i_deletable.js", "./core/interfaces/i_draggable.js", @@ -186,14 +196,15 @@ "./core/events/events_var_delete.js", "./core/variable_map.js", "./core/names.js", - "./core/events/events_block_base.js", - "./core/events/events_block_change.js", "./core/events/events_ui_base.js", "./core/events/events_marker_move.js", "./core/renderers/common/marker_svg.js", "./core/keyboard_nav/marker.js", + "./core/keyboard_nav/ast_node.js", + "./core/keyboard_nav/cursor.js", "./core/marker_manager.js", "./core/field_label.js", + "./core/input_types.js", "./core/interfaces/i_registrable_field.js", "./core/field_registry.js", "./core/input.js", @@ -216,8 +227,10 @@ "./core/procedures.js", "./core/workspace_svg.js", "./core/utils/rect.js", + "./core/utils/size.js", "./core/utils/coordinate.js", "./core/utils/style.js", + "./core/utils/deprecation.js", "./core/utils/svg_math.js", "./core/bubble_dragger.js", "./core/block_animations.js", @@ -226,23 +239,9 @@ "./core/browser_events.js", "./core/tooltip.js", "./core/block_svg.js", - "./core/interfaces/i_flyout.js", - "./core/interfaces/i_toolbox.js", - "./core/interfaces/i_toolbox_item.js", - "./core/interfaces/i_selectable_toolbox_item.js", - "./core/interfaces/i_collapsible_toolbox_item.js", - "./core/utils/aria.js", - "./core/utils/deprecation.js", - "./core/css.js", - "./core/toolbox/category.js", - "./core/input_types.js", - "./core/utils/size.js", - "./core/serialization/exceptions.js", - "./core/interfaces/i_serializer.js", - "./core/serialization/registry.js", - "./core/serialization/priorities.js", - "./core/serialization/blocks.js", - "./core/utils/toolbox.js", + "./core/events/events_block_base.js", + "./core/events/events_block_change.js", + "./core/utils/xml.js", "./core/connection_type.js", "./core/internal_constants.js", "./core/mutator.js", @@ -252,13 +251,14 @@ "./core/extensions.js", "./core/block.js", "./core/utils/string.js", + "./core/utils/object.js", "./core/dialog.js", - "./core/utils/xml.js", "./core/events/events_var_base.js", "./core/events/events_var_create.js", "./core/variable_model.js", "./core/variables.js", "./core/events/events_abstract.js", + "./core/registry.js", "./core/events/utils.js", "./core/xml.js", "./core/connection.js",