From bcb57b7efd721878e275255ac4b09fc18064fced Mon Sep 17 00:00:00 2001 From: kozbial Date: Wed, 21 Jul 2021 15:45:51 -0700 Subject: [PATCH] Migrate core/field_label_serializable.js named requires --- core/field_label_serializable.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/field_label_serializable.js b/core/field_label_serializable.js index 77784eb4c..828a9954b 100644 --- a/core/field_label_serializable.js +++ b/core/field_label_serializable.js @@ -14,10 +14,10 @@ goog.module('Blockly.FieldLabelSerializable'); goog.module.declareLegacyNamespace(); -goog.require('Blockly.FieldLabel'); -goog.require('Blockly.fieldRegistry'); -goog.require('Blockly.utils'); -goog.require('Blockly.utils.object'); +const FieldLabel = goog.require('Blockly.FieldLabel'); +const fieldRegistry = goog.require('Blockly.fieldRegistry'); +const {inherits} = goog.require('Blockly.utils.object'); +const {replaceMessageReferences} = goog.require('Blockly.utils'); /** @@ -28,7 +28,7 @@ goog.require('Blockly.utils.object'); * @param {Object=} opt_config A map of options used to configure the field. * See the [field creation documentation]{@link https://developers.google.com/blockly/guides/create-custom-blocks/fields/built-in-fields/label-serializable#creation} * for a list of properties this parameter supports. - * @extends {Blockly.FieldLabel} + * @extends {FieldLabel} * @constructor * */ @@ -36,8 +36,8 @@ const FieldLabelSerializable = function(opt_value, opt_class, opt_config) { FieldLabelSerializable.superClass_.constructor.call( this, opt_value, opt_class, opt_config); }; -Blockly.utils.object.inherits(FieldLabelSerializable, - Blockly.FieldLabel); +inherits(FieldLabelSerializable, + FieldLabel); /** * Construct a FieldLabelSerializable from a JSON arg object, @@ -48,7 +48,7 @@ Blockly.utils.object.inherits(FieldLabelSerializable, * @nocollapse */ FieldLabelSerializable.fromJson = function(options) { - const text = Blockly.utils.replaceMessageReferences(options['text']); + const text = replaceMessageReferences(options['text']); // `this` might be a subclass of FieldLabelSerializable if that class doesn't // override the static fromJson method. return new this(text, undefined, options); @@ -68,7 +68,7 @@ FieldLabelSerializable.prototype.EDITABLE = false; */ FieldLabelSerializable.prototype.SERIALIZABLE = true; -Blockly.fieldRegistry.register( +fieldRegistry.register( 'field_label_serializable', FieldLabelSerializable); exports = FieldLabelSerializable;