From 8bd2e8c9e263364f849da80810d2be65e0638069 Mon Sep 17 00:00:00 2001 From: kozbial Date: Thu, 23 Sep 2021 10:47:04 -0700 Subject: [PATCH] chore: Remove declareLegacyNamespace() from toolbox/ files --- core/blockly.js | 10 ++++++++++ core/toolbox/category.js | 1 - core/toolbox/collapsible_category.js | 1 - core/toolbox/separator.js | 1 - core/toolbox/toolbox.js | 1 - core/toolbox/toolbox_item.js | 1 - tests/deps.js | 2 +- tests/deps.mocha.js | 2 +- 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/core/blockly.js b/core/blockly.js index ffb8fa47dd4..5d9da89c89a 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -18,6 +18,11 @@ goog.module('Blockly'); goog.module.declareLegacyNamespace(); const Blocks = goog.require('Blockly.Blocks'); +const CollapsibleToolboxCategory = goog.require('Blockly.CollapsibleToolboxCategory'); +const Toolbox = goog.require('Blockly.Toolbox'); +const ToolboxCategory = goog.require('Blockly.ToolboxCategory'); +const ToolboxItem = goog.require('Blockly.ToolboxItem'); +const ToolboxSeparator = goog.require('Blockly.ToolboxSeparator'); /* eslint-disable-next-line no-unused-vars */ const ICopyable = goog.requireType('Blockly.ICopyable'); const Marker = goog.require('Blockly.Marker'); @@ -425,6 +430,11 @@ exports.Block = Block; exports.BlockDragger = BlockDragger; exports.BlockDragSurfaceSvg = BlockDragSurfaceSvg; exports.BlockSvg = BlockSvg; +exports.CollapsibleToolboxCategory = CollapsibleToolboxCategory; exports.Cursor = Cursor; exports.Marker = Marker; exports.TabNavigateCursor = TabNavigateCursor; +exports.Toolbox = Toolbox; +exports.ToolboxCategory = ToolboxCategory; +exports.ToolboxItem = ToolboxItem; +exports.ToolboxSeparator = ToolboxSeparator; diff --git a/core/toolbox/category.js b/core/toolbox/category.js index d050290349f..1d0a1fe7f60 100644 --- a/core/toolbox/category.js +++ b/core/toolbox/category.js @@ -11,7 +11,6 @@ 'use strict'; goog.module('Blockly.ToolboxCategory'); -goog.module.declareLegacyNamespace(); const Css = goog.require('Blockly.Css'); /* eslint-disable-next-line no-unused-vars */ diff --git a/core/toolbox/collapsible_category.js b/core/toolbox/collapsible_category.js index 923d681b24a..e36a6e61c8d 100644 --- a/core/toolbox/collapsible_category.js +++ b/core/toolbox/collapsible_category.js @@ -11,7 +11,6 @@ 'use strict'; goog.module('Blockly.CollapsibleToolboxCategory'); -goog.module.declareLegacyNamespace(); /* eslint-disable-next-line no-unused-vars */ const ICollapsibleToolboxItem = goog.requireType('Blockly.ICollapsibleToolboxItem'); diff --git a/core/toolbox/separator.js b/core/toolbox/separator.js index dbf30f4f014..359b0cdf35c 100644 --- a/core/toolbox/separator.js +++ b/core/toolbox/separator.js @@ -12,7 +12,6 @@ 'use strict'; goog.module('Blockly.ToolboxSeparator'); -goog.module.declareLegacyNamespace(); const Css = goog.require('Blockly.Css'); /* eslint-disable-next-line no-unused-vars */ diff --git a/core/toolbox/toolbox.js b/core/toolbox/toolbox.js index e0eb0f611fa..347b06ad088 100644 --- a/core/toolbox/toolbox.js +++ b/core/toolbox/toolbox.js @@ -11,7 +11,6 @@ 'use strict'; goog.module('Blockly.Toolbox'); -goog.module.declareLegacyNamespace(); /* eslint-disable-next-line no-unused-vars */ const BlocklyOptions = goog.requireType('Blockly.BlocklyOptions'); diff --git a/core/toolbox/toolbox_item.js b/core/toolbox/toolbox_item.js index 8a51a020e5f..dbc380b0fcd 100644 --- a/core/toolbox/toolbox_item.js +++ b/core/toolbox/toolbox_item.js @@ -11,7 +11,6 @@ 'use strict'; goog.module('Blockly.ToolboxItem'); -goog.module.declareLegacyNamespace(); /* eslint-disable-next-line no-unused-vars */ const ICollapsibleToolboxItem = goog.requireType('Blockly.ICollapsibleToolboxItem'); diff --git a/tests/deps.js b/tests/deps.js index 83dc22eec82..f2d910b895d 100644 --- a/tests/deps.js +++ b/tests/deps.js @@ -12,7 +12,7 @@ goog.addDependency('../../core/block_animations.js', ['Blockly.blockAnimations'] goog.addDependency('../../core/block_drag_surface.js', ['Blockly.BlockDragSurfaceSvg'], ['Blockly.utils', 'Blockly.utils.Coordinate', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/block_dragger.js', ['Blockly.BlockDragger'], ['Blockly.Events', 'Blockly.Events.BlockDrag', 'Blockly.Events.BlockMove', 'Blockly.InsertionMarkerManager', 'Blockly.blockAnimations', 'Blockly.bumpObjects', 'Blockly.common', 'Blockly.registry', 'Blockly.utils.Coordinate', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/block_svg.js', ['Blockly.BlockSvg'], ['Blockly.ASTNode', 'Blockly.Block', 'Blockly.ContextMenu', 'Blockly.ContextMenuRegistry', 'Blockly.Events', 'Blockly.Events.BlockMove', 'Blockly.Events.Selected', 'Blockly.FieldLabel', 'Blockly.MarkerManager', 'Blockly.Msg', 'Blockly.RenderedConnection', 'Blockly.TabNavigateCursor', 'Blockly.Tooltip', 'Blockly.Touch', 'Blockly.blockAnimations', 'Blockly.browserEvents', 'Blockly.common', 'Blockly.connectionTypes', 'Blockly.constants', 'Blockly.internalConstants', 'Blockly.serialization.blocks', 'Blockly.utils', 'Blockly.utils.Coordinate', 'Blockly.utils.Rect', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.object', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/blockly.js', ['Blockly'], ['Blockly.ASTNode', 'Blockly.BasicCursor', 'Blockly.Block', 'Blockly.BlockDragSurfaceSvg', 'Blockly.BlockDragger', 'Blockly.BlockSvg', 'Blockly.Blocks', 'Blockly.Cursor', 'Blockly.Events.BlockCreate', 'Blockly.Events.FinishedLoading', 'Blockly.Events.Ui', 'Blockly.Events.UiBase', 'Blockly.Events.VarCreate', 'Blockly.Marker', 'Blockly.Procedures', 'Blockly.TabNavigateCursor', 'Blockly.Touch', 'Blockly.Variables', 'Blockly.Xml', 'Blockly.browserEvents', 'Blockly.clipboard', 'Blockly.common', 'Blockly.connectionTypes', 'Blockly.constants', 'Blockly.dialog', 'Blockly.inject', 'Blockly.inputTypes', 'Blockly.internalConstants', 'Blockly.utils.Size', 'Blockly.utils.colour', 'Blockly.utils.deprecation', 'Blockly.utils.toolbox'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/blockly.js', ['Blockly'], ['Blockly.ASTNode', 'Blockly.BasicCursor', 'Blockly.Block', 'Blockly.BlockDragSurfaceSvg', 'Blockly.BlockDragger', 'Blockly.BlockSvg', 'Blockly.Blocks', 'Blockly.CollapsibleToolboxCategory', 'Blockly.Cursor', 'Blockly.Events.BlockCreate', 'Blockly.Events.FinishedLoading', 'Blockly.Events.Ui', 'Blockly.Events.UiBase', 'Blockly.Events.VarCreate', 'Blockly.Marker', 'Blockly.Procedures', 'Blockly.TabNavigateCursor', 'Blockly.Toolbox', 'Blockly.ToolboxCategory', 'Blockly.ToolboxItem', 'Blockly.ToolboxSeparator', 'Blockly.Touch', 'Blockly.Variables', 'Blockly.Xml', 'Blockly.browserEvents', 'Blockly.clipboard', 'Blockly.common', 'Blockly.connectionTypes', 'Blockly.constants', 'Blockly.dialog', 'Blockly.inject', 'Blockly.inputTypes', 'Blockly.internalConstants', 'Blockly.utils.Size', 'Blockly.utils.colour', 'Blockly.utils.deprecation', 'Blockly.utils.toolbox'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/blockly_options.js', ['Blockly.BlocklyOptions'], [], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/blocks.js', ['Blockly.Blocks'], [], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/browser_events.js', ['Blockly.browserEvents'], ['Blockly.Touch', 'Blockly.internalConstants', 'Blockly.utils.global', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'}); diff --git a/tests/deps.mocha.js b/tests/deps.mocha.js index f8f26baee7d..7e1d189d8ca 100644 --- a/tests/deps.mocha.js +++ b/tests/deps.mocha.js @@ -12,7 +12,7 @@ goog.addDependency('../../core/block_animations.js', ['Blockly.blockAnimations'] goog.addDependency('../../core/block_drag_surface.js', ['Blockly.BlockDragSurfaceSvg'], ['Blockly.utils', 'Blockly.utils.Coordinate', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/block_dragger.js', ['Blockly.BlockDragger'], ['Blockly.Events', 'Blockly.Events.BlockDrag', 'Blockly.Events.BlockMove', 'Blockly.InsertionMarkerManager', 'Blockly.blockAnimations', 'Blockly.bumpObjects', 'Blockly.common', 'Blockly.registry', 'Blockly.utils.Coordinate', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/block_svg.js', ['Blockly.BlockSvg'], ['Blockly.ASTNode', 'Blockly.Block', 'Blockly.ContextMenu', 'Blockly.ContextMenuRegistry', 'Blockly.Events', 'Blockly.Events.BlockMove', 'Blockly.Events.Selected', 'Blockly.FieldLabel', 'Blockly.MarkerManager', 'Blockly.Msg', 'Blockly.RenderedConnection', 'Blockly.TabNavigateCursor', 'Blockly.Tooltip', 'Blockly.Touch', 'Blockly.blockAnimations', 'Blockly.browserEvents', 'Blockly.common', 'Blockly.connectionTypes', 'Blockly.constants', 'Blockly.internalConstants', 'Blockly.serialization.blocks', 'Blockly.utils', 'Blockly.utils.Coordinate', 'Blockly.utils.Rect', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.object', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/blockly.js', ['Blockly'], ['Blockly.ASTNode', 'Blockly.BasicCursor', 'Blockly.Block', 'Blockly.BlockDragSurfaceSvg', 'Blockly.BlockDragger', 'Blockly.BlockSvg', 'Blockly.Blocks', 'Blockly.Cursor', 'Blockly.Events.BlockCreate', 'Blockly.Events.FinishedLoading', 'Blockly.Events.Ui', 'Blockly.Events.UiBase', 'Blockly.Events.VarCreate', 'Blockly.Marker', 'Blockly.Procedures', 'Blockly.TabNavigateCursor', 'Blockly.Touch', 'Blockly.Variables', 'Blockly.Xml', 'Blockly.browserEvents', 'Blockly.clipboard', 'Blockly.common', 'Blockly.connectionTypes', 'Blockly.constants', 'Blockly.dialog', 'Blockly.inject', 'Blockly.inputTypes', 'Blockly.internalConstants', 'Blockly.utils.Size', 'Blockly.utils.colour', 'Blockly.utils.deprecation', 'Blockly.utils.toolbox'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/blockly.js', ['Blockly'], ['Blockly.ASTNode', 'Blockly.BasicCursor', 'Blockly.Block', 'Blockly.BlockDragSurfaceSvg', 'Blockly.BlockDragger', 'Blockly.BlockSvg', 'Blockly.Blocks', 'Blockly.CollapsibleToolboxCategory', 'Blockly.Cursor', 'Blockly.Events.BlockCreate', 'Blockly.Events.FinishedLoading', 'Blockly.Events.Ui', 'Blockly.Events.UiBase', 'Blockly.Events.VarCreate', 'Blockly.Marker', 'Blockly.Procedures', 'Blockly.TabNavigateCursor', 'Blockly.Toolbox', 'Blockly.ToolboxCategory', 'Blockly.ToolboxItem', 'Blockly.ToolboxSeparator', 'Blockly.Touch', 'Blockly.Variables', 'Blockly.Xml', 'Blockly.browserEvents', 'Blockly.clipboard', 'Blockly.common', 'Blockly.connectionTypes', 'Blockly.constants', 'Blockly.dialog', 'Blockly.inject', 'Blockly.inputTypes', 'Blockly.internalConstants', 'Blockly.utils.Size', 'Blockly.utils.colour', 'Blockly.utils.deprecation', 'Blockly.utils.toolbox'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/blockly_options.js', ['Blockly.BlocklyOptions'], [], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/blocks.js', ['Blockly.Blocks'], [], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/browser_events.js', ['Blockly.browserEvents'], ['Blockly.Touch', 'Blockly.internalConstants', 'Blockly.utils.global', 'Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});