Skip to content

Commit

Permalink
chore: Remove declareLegacyNamespace() from field_* files
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfunko committed Sep 23, 2021
1 parent 1504c99 commit da893a1
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 18 deletions.
24 changes: 24 additions & 0 deletions core/blockly.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ goog.module('Blockly');
goog.module.declareLegacyNamespace();

const Blocks = goog.require('Blockly.Blocks');
const Field = goog.require('Blockly.Field');
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 FieldLabel = goog.require('Blockly.FieldLabel');
const FieldLabelSerializable = goog.require('Blockly.FieldLabelSerializable');
const FieldMultilineInput = goog.require('Blockly.FieldMultilineInput');
const FieldNumber = goog.require('Blockly.FieldNumber');
const FieldTextInput = goog.require('Blockly.FieldTextInput');
const FieldVariable = goog.require('Blockly.FieldVariable');
/* eslint-disable-next-line no-unused-vars */
const ICopyable = goog.requireType('Blockly.ICopyable');
const Marker = goog.require('Blockly.Marker');
Expand All @@ -35,6 +46,7 @@ const connectionTypes = goog.require('Blockly.connectionTypes');
const constants = goog.require('Blockly.constants');
const deprecation = goog.require('Blockly.utils.deprecation');
const dialog = goog.require('Blockly.dialog');
const fieldRegistry = goog.require('Blockly.fieldRegistry');
const inputTypes = goog.require('Blockly.inputTypes');
const internalConstants = goog.require('Blockly.internalConstants');
const toolbox = goog.require('Blockly.utils.toolbox');
Expand Down Expand Up @@ -426,5 +438,17 @@ exports.BlockDragger = BlockDragger;
exports.BlockDragSurfaceSvg = BlockDragSurfaceSvg;
exports.BlockSvg = BlockSvg;
exports.Cursor = Cursor;
exports.Field = Field;
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.Marker = Marker;
exports.TabNavigateCursor = TabNavigateCursor;
exports.fieldRegistry = fieldRegistry;
5 changes: 3 additions & 2 deletions core/events/events_block_change.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
goog.module('Blockly.Events.BlockChange');
goog.module.declareLegacyNamespace();

const BlockBase = goog.require('Blockly.Events.BlockBase');
const Events = goog.require('Blockly.Events');
const Xml = goog.require('Blockly.Xml');
const object = goog.require('Blockly.utils.object');
Expand All @@ -31,7 +32,7 @@ const {BlockSvg} = goog.requireType('Blockly.BlockSvg');
* @param {?string=} opt_name Name of input or field affected, or null.
* @param {*=} opt_oldValue Previous value of element.
* @param {*=} opt_newValue New value of element.
* @extends {Events.BlockBase}
* @extends {BlockBase}
* @constructor
*/
const BlockChange = function(
Expand All @@ -45,7 +46,7 @@ const BlockChange = function(
this.oldValue = typeof opt_oldValue == 'undefined' ? '' : opt_oldValue;
this.newValue = typeof opt_newValue == 'undefined' ? '' : opt_newValue;
};
object.inherits(BlockChange, Events.BlockBase);
object.inherits(BlockChange, BlockBase);

/**
* Type of this event.
Expand Down
1 change: 0 additions & 1 deletion core/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'use strict';

goog.module('Blockly.Field');
goog.module.declareLegacyNamespace();

/* eslint-disable-next-line no-unused-vars */
const ConstantProvider = goog.requireType('Blockly.blockRendering.ConstantProvider');
Expand Down
1 change: 0 additions & 1 deletion core/field_checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

goog.module('Blockly.FieldCheckbox');
goog.module.declareLegacyNamespace();

const Field = goog.require('Blockly.Field');
const dom = goog.require('Blockly.utils.dom');
Expand Down
1 change: 0 additions & 1 deletion core/field_colour.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

goog.module('Blockly.FieldColour');
goog.module.declareLegacyNamespace();

const Css = goog.require('Blockly.Css');
const DropDownDiv = goog.require('Blockly.DropDownDiv');
Expand Down
1 change: 0 additions & 1 deletion core/field_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'use strict';

goog.module('Blockly.FieldDropdown');
goog.module.declareLegacyNamespace();

const Coordinate = goog.require('Blockly.utils.Coordinate');
const DropDownDiv = goog.require('Blockly.DropDownDiv');
Expand Down
1 change: 0 additions & 1 deletion core/field_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

goog.module('Blockly.FieldImage');
goog.module.declareLegacyNamespace();

const Field = goog.require('Blockly.Field');
const Size = goog.require('Blockly.utils.Size');
Expand Down
1 change: 0 additions & 1 deletion core/field_label.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
'use strict';

goog.module('Blockly.FieldLabel');
goog.module.declareLegacyNamespace();

const Field = goog.require('Blockly.Field');
const dom = goog.require('Blockly.utils.dom');
Expand Down
1 change: 0 additions & 1 deletion core/field_label_serializable.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
'use strict';

goog.module('Blockly.FieldLabelSerializable');
goog.module.declareLegacyNamespace();

const FieldLabel = goog.require('Blockly.FieldLabel');
const fieldRegistry = goog.require('Blockly.fieldRegistry');
Expand Down
1 change: 0 additions & 1 deletion core/field_multilineinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'use strict';

goog.module('Blockly.FieldMultilineInput');
goog.module.declareLegacyNamespace();

const Css = goog.require('Blockly.Css');
const Field = goog.require('Blockly.Field');
Expand Down
1 change: 0 additions & 1 deletion core/field_number.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

goog.module('Blockly.FieldNumber');
goog.module.declareLegacyNamespace();

const FieldTextInput = goog.require('Blockly.FieldTextInput');
const aria = goog.require('Blockly.utils.aria');
Expand Down
1 change: 0 additions & 1 deletion core/field_registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'use strict';

goog.module('Blockly.fieldRegistry');
goog.module.declareLegacyNamespace();

/* eslint-disable-next-line no-unused-vars */
const Field = goog.requireType('Blockly.Field');
Expand Down
1 change: 0 additions & 1 deletion core/field_textinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

goog.module('Blockly.FieldTextInput');
goog.module.declareLegacyNamespace();

const Coordinate = goog.require('Blockly.utils.Coordinate');
const DropDownDiv = goog.require('Blockly.DropDownDiv');
Expand Down
1 change: 0 additions & 1 deletion core/field_variable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

goog.module('Blockly.FieldVariable');
goog.module.declareLegacyNamespace();

const FieldDropdown = goog.require('Blockly.FieldDropdown');
/* eslint-disable-next-line no-unused-vars */
Expand Down
4 changes: 2 additions & 2 deletions tests/deps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/deps.mocha.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da893a1

Please sign in to comment.