refactor: Rename ALIGN to Align and move from constants.js to input.js (#5742)

This constant is used to specify the alignment of
an Input, so it should live in the same file as the Input class.

I've done this as a separate named export, but it could alternatively
be made a static member of Input (i.e., Input.Align with only Input
being exported by name).

Where mocha tests were referring to Blockly.constants.ALIGN.*
without actually requiring Blockly.constants, I have reverted
them to refer to Blockly.ALIGN_* instead (pending conversion
to named requries).

Part of #5073.
This commit is contained in:
Christopher Allen
2021-11-29 21:59:48 +00:00
committed by GitHub
parent 985af10f6e
commit c0d22f2002
9 changed files with 56 additions and 42 deletions

View File

@@ -97,6 +97,22 @@ const renamings = {
'6.20210701.0': {
'Blockly': {
exports: {
// Align.
ALIGN_LEFT: {
module: 'Blockly.Input',
export: 'Align.LEFT',
path: 'Blockly.ALIGN_LEFT',
},
ALIGN_CENTRE: {
module: 'Blockly.Input',
export: 'Align.CENTRE',
path: 'Blockly.ALIGN_CENTRE',
},
ALIGN_RIGHT: {
module: 'Blockly.Input',
export: 'Align.RIGHT',
path: 'Blockly.ALIGN_RIGHT',
},
// Clipboard. See PR #5237.
clipboardXml_: {module: 'Blockly.clipboard', export: 'xml'},
clipboardSource_: {module: 'Blockly.clipboard', export: 'source'},