chore: Move functions from utils (#5706)

* chore: move functions from utils to more specific files

* chore: use new names for utils functions

* chore: run clang-format

* chore: add deprecation warnings back to utils.js
This commit is contained in:
Rachel Fenichel
2021-11-15 15:59:27 -08:00
committed by GitHub
parent 6c10b6031c
commit 969fcac455
30 changed files with 749 additions and 495 deletions

View File

@@ -24,8 +24,8 @@ const dom = goog.require('Blockly.utils.dom');
const eventUtils = goog.require('Blockly.Events.utils');
const fieldRegistry = goog.require('Blockly.fieldRegistry');
const object = goog.require('Blockly.utils.object');
const parsing = goog.require('Blockly.utils.parsing');
const userAgent = goog.require('Blockly.utils.userAgent');
const utils = goog.require('Blockly.utils');
/* eslint-disable-next-line no-unused-vars */
const {BlockSvg} = goog.requireType('Blockly.BlockSvg');
const {Coordinate} = goog.require('Blockly.utils.Coordinate');
@@ -116,7 +116,7 @@ FieldTextInput.prototype.DEFAULT_VALUE = '';
* @nocollapse
*/
FieldTextInput.fromJson = function(options) {
const text = utils.replaceMessageReferences(options['text']);
const text = parsing.replaceMessageReferences(options['text']);
// `this` might be a subclass of FieldTextInput if that class doesn't override
// the static fromJson method.
return new this(text, undefined, options);